Simple Usage Examples
The Management API's endpoint details can always be found at your Trivore ID instance's
/apidoc endpoint, for example https://{your-id-server}/apidoc. That documentation is
automatically generated by Swagger, and always shows the current list of available endpoints.
Since the API is subject to change, individual Management API endpoints aren't documented in
this page — refer to the /apidoc endpoint instead. Each API operation there lists the
permissions required to access it.
Almost all Management API endpoints require authentication via the
HTTP "Basic" authentication scheme. When accessing the
API with curl, the Basic authentication header is inserted into the request with the -H
switch, like this:
curl -X GET "https://{your-id-server}/api/rest/v1/user" \
-H "accept: application/json" \
-H "authorization: Basic m9vOmJhcg=="
The username and password are given as username:password and then Base64-encoded — see RFC
7617 for more information. Also make sure to include the
accept header as in the example above, since it's required by some API endpoints.
Especially when troubleshooting errors, always pay attention to the response headers and content, since they contain information about what went wrong. For example, if the client doesn't have the required permission to access a resource, the response has status code 403 along with the name of the missing permission:
{
"errorMessage": "Client does not have required permission ACCOUNT_VIEW.",
"statusCode": 403
}