Quick Start¶
Authentication¶
Create an MDM/Insights API Access Token from the "API Access" page in the MDM (see detailed documentation).
Once your token is created, you will have to set it in the header of each request to the API:
Authorization: Bearer abcdefghijk
Definitions¶
You may find the API documentations here:
On both instances, you can explore the documentation online or you can also download the OpenAPI schema and open it with an API testing tool.
Example: If using Postman, import the file as a Collection with the following advanced options:
- Naming requests: URL
- Request parameter generation: Schema
- Response parameter generation: Schema
- Folder organization: Tags
Then edit the collection:
- Add your access token in Authorization → Bearer Token :
my_token
- Set Variables → baseUrl
- MDM:
https://my.famoco.com
- Insights:
https://insights.famoco.com
- MDM:
Throttling¶
API calls are rate-limited to prevent abusive usage which could degrade the performance of the service.
The mechanism limits the number of requests per client for a given time window. Beyond that limit, the API returns an HTTP error (429 Too Many Requests) until the counter is reset, at the end of the time window.
All API requests are limited to a maximum of:
- MDM API endpoints: 100 requests/minute and 1000 requests/hour per client
- MDM API export endpoints (i.e.
/api/organizations/<id>/<resource>/export/
): 6 requests/minute per client - Insights API endpoints: 60 requests/minute and 600 requests/hour per client
Note
A client is identified as a user (if authenticated), through an API Access Token, or with their IP address (if it is not authenticated).
Here is a sample response from a request that was rate-limited. The number of
seconds to wait before new requests can be sent is given in the Retry-After
header.
HTTP 429 Too Many Requests
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Retry-After: 3254
Vary: Accept
{
"errors": {
"detail": "Request was throttled. Expected available in 3254 seconds."
}
}