Setup endpoint: HTTPS

Invite marbot to a Slack channel to create a new HTTPS endpoint, or use an existing endpoint ID. The endpoint URL will look like this: https://api.marbot.io/v1/endpoint/$endpoint-ID. Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel.

The same URL is used for the AWS SNS HTTPS endpoint

The HTTPS endpoint can receive GET and POST requests.

AWS examples

3rd party examples

GET

You can use query parameters to send structured data to marbot. Ensure that the values are URL encoded.

Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel. Request using curl:

curl "https://api.marbot.io/v1/endpoint/$endpoint-ID?message=Uuuuups&details=Something%20went%20wrong&time=2017-06-23T05:53:10Z"

Results in the following generic alert:

Generic Alert

POST

marbot understands the following content types:

  1. application/x-www-form-urlencoded: Parsed as URL encoded values
  2. application/json: Parsed as JSON
  3. text/plain: Parsed as JSON or falls back to plain text

For all other content types, marbot tries to parse the input as JSON and falls back to plain text.

application/x-www-form-urlencoded

When data that has been entered into HTML forms is submitted, the form field names and values are encoded, and application/x-www-form-urlencoded is included in the message’s Content-Type header.

Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel. Request using curl:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'message=Uuuuups&details=Something went wrong&time=2017-06-23T05:53:10Z' "https://api.marbot.io/v1/endpoint/$endpoint-ID"

Results in the following generic alert:

Generic Alert

application/json

You can also send JSON over HTTPS POST. Include the Content-Type header application/json to indicate that you are sending a JSON-formatted message.

Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel. Request using curl:

curl -X POST -H "Content-Type: application/json" -d '{"message": "Uuuuups", "details": "Something went wrong", "time": "2017-06-23T05:53:10Z"}' "https://api.marbot.io/v1/endpoint/$endpoint-ID"

Results in the following generic alert:

Generic Alert

text/plain

If the text is in JSON format, I will parse it.

Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel. Request using curl:

curl -X POST -H "Content-Type: text/plain" -d '{"message": "Uuuuups", "details": "Something went wrong", "time": "2017-06-23T05:53:10Z"}' "https://api.marbot.io/v1/endpoint/$endpoint-ID"

Results in the following generic alert:

Generic Alert

Otherwise, I will understand the input as plain text.

Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel. Request using curl:

curl -X POST -H "Content-Type: text/plain" -d 'Uuuuups. Something went wrong. 2017-06-23T05:53:10Z' "https://api.marbot.io/v1/endpoint/$endpoint-ID"

Results in the following generic alert:

Generic Alert