Skip to content

APIs ​

WARNING

You need API access enabled in your account settings to use the APIs. Please contact us to enable.

Some functionality of Collect is available through APIs.

Setup ​

Before using the APIs you need to create an API key.

  • Go to your account and then to the API tab.
  • Click on Create API Key.
  • Enter a name for the key and click Confirm.
  • Copy the Secret key and store it securely.

Testing ​

You can test the API using the built in API testing tool. Note this is only available to administrators.

Using APIs ​

All calls to start with the base URL:

https://api.madronus.com/api/v1

For example:

https://api.madronus.com/api/v1/observations/get-types

Method ​

All requests should be sent using POST method.

Headers ​

Most requests should be include both a Content-Type and Authorization header.

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Authentication ​

You will first need to create an API key for your account. This can be done in Account / API. Keep the key super secret at all times; it is super powerful. This API key must be set in the Authorization header.

Body ​

All other input should be added as JSON to the request body. An example HTTP request.

POST / HTTP/1.1
Host: https://api.madronus.com/api/v1/get-types
Content-Type: application/json
Authorization: Bearer <token>

{ "assessmentIds": [123, 567] }

Response ​

Most responses will be returned with status code 20x, and include JSON as a response.

HTTP/1.1 200 Accepted
Content-Type: application/json

{
  "error": "false",
  "data": {
    assessmentList: [<assessments>]
  }
}

If an error occurs error will be set to true and a message will be set. All returned data will be in the data property.

It may occur that a 40x status code is returned. This may be because of missing required inputs, or a user not being authorized for endpoint.

Under endpoints, the data shown as returned is what is expected in the data property.

API Endpoints ​

Ping ​

/ping

Used to test that the API is working with the given API key.

Does not return any data.

Other ​


INFO

If there are APIs missing that you would like to see, please let us know.