Add events using our API

These advanced events can be created only in an automated way via our API. The best way to use them is to incorporate a request to our API in your code deployment scripts (to do so by your agency) and in your configuration management tool (to do so by your provider).

Our API can be accessed via a simple HTTP request: "https://www.quanta-monitoring.com/api/events/push"The parameters to be entered are as follows:

Type: The type of the event. It can either be "code_deploy" (deployment code), "config_change" (system configuration change), "comment" (comment), "cron" (background job) or "custom" (generic event)

Content: The message associated with the event. This may be the version of the application or the changes made. You are free to use this field as you like.

You must also specify an API token to authenticate the request. This token can be generated in the "Integrations" section of your site settings in QUANTA.You can also add a custom icon in order to easily identify events added in this way.

This token must be either:

Inserted in the HTTP header "Authorization" in the form: Authorization Token <your_token>

Passed directly in the query by adding this parameter at the end of the URL: ?auth_token=<your_token>

Sample query with cURL which adds a code deployment event with the message "Version 42.0". We see the presence of the header "Content-Type" which is essential for our API to consider the query:

If you wish to integrate events via another service which does not allow for POST queries, you can use the API via a GET query. E.g. the following command adds a generic event ("custom") with the content "hello" using cURL:

NB: In the 2 requests/queries above, the -m option of cURL can position a timeout to 10 seconds so as not to to block your scripts in the case of an unavailability of our API.

Our API will send back an HTTP 200 code if successful, and a 4xx or 5xx if there was an error. The response will contain a JSON content with the field "error" in case of error or "success" if successful.