Setup endpoint: HTTPS

Invite marbot to a Slack channel to create a new HTTPS endpoint, or use an existing endpoint ID. marbot provides the URL of the endpoint in a message to the channel. The URL will look like this: https://api.marbot.io/v1/endpoint/$endpoint-ID

The same URL is used for the AWS SNS HTTPS endpoint

The HTTPS endpoint can receive GET and POST requests.

3rd party examples

GET

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

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.

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.

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

Could be JSON:

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

Or plain text:

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