Atoka API User Reference

Monitoring API

This API allows you to retrieve all the monitoring events on companies, people, locations, etc. Currently it is not possible to monitor every single event, please contact us if you need something specific.

This API endpoint is only a stub, and is not yet implemented. You can use it to test the integration with atoka.

https://api.atoka.io/v2/monitoring

All requests must be properly authenticated.

response

This API allows you to retrieve all the monitoring events on companies, people, locations, etc. Currently it is not possible to monitor every single event, please contact us if you need something specific.

This API endpoint is only a stub, and is not yet implemented. You can use it to test the integration with atoka.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

curl -G "https://api.atoka.io/v2/monitoring"

Ordering & Pagination

To download long lists of results you can paginate returned items using these parameters.

Parameters
  • limit integer,
    default is 100

    This is the number of individual objects that are returned in each page.

    Use a number between 0 and 10000.

  • lastSeen integer

    For performance reasons, pagination is not implemented through the usual offest parameter; you will have to provide the ID of the last event you received from previous calls in order to properly paginate.

curl -G "https://api.atoka.io/v2/monitoring" -d "limit=100" -d "lastSeen=1234567"

General info

These filters act on the general information of the monitoring events, such as the item they are related to, or the date they were generated.

Parameters
  • companies array

    Search via already known Atoka Company ID.

    Accepts multiple values, separated with , (comma) char.

  • people array

    Search via already known Atoka Person ID.

    Accepts multiple values, separated with , (comma) char.

  • locations array

    Search via already known Atoka Location ID.

    Accepts multiple values, separated with , (comma) char.

  • dateFrom string

    This filter can be used to retrieve all the events happened after a given datetime.

  • dateTo string

    This filter can be used to retrieve all the events happened up to a given datetime.

curl -G "https://api.atoka.io/v2/monitoring" -d "companies=123456789,234567891,345678912" -d "dateFrom=2015-12-28T24:00:00+01:00" -d "dateTo=2015-12-28T13:42:17.45001+01:00"

Debug

Use these parameters when you need to understand how your request was evaluated by the API.

Parameters
  • explain boolean,
    default is false

    When using this parameter in your request you'll get and additional property in the results explanation, that contains all the filters actually used during the query.

    Mostly useful for debugging purposes.

curl -G "https://api.atoka.io/v2/monitoring" -d "explain=true"

Response modifications

When explain is true, the response will be:

{
"companies": [
"string",
...
],
"limit": int,
"dateFrom": "string",
"dateTo": "string"
}
curl -G "https://api.atoka.io/v2/monitoring" -d "explain=true"

Response

The response of the monitoring api

{
"meta": {
"limit": int, // the maximum number of items requested with the "limit" parameter.
"lastSeen": int // the ID of the last event returned; this can be used to easily paginate.
},
"items": [
{
"id": int, // event ID; the greatest, the youngest.
"date": "string", // the date-time of the event.
"code": "string", // the event code.
"codeName": "string", // a more human-readable code for the event.
"itemId": "string", // the atoka ID of the item being affected by the event.
"itemType": "string", // the item type; company, person, location.
"prevValue": string,object,boolean,number,array, // the value of the field being affected by the event, before the change.
"newValue": string,object,boolean,number,array, // the value of the field being affected by the event, after the change.
},
...
]
}