Managing Users via Invotra’s API
Here’s our guide on the Invotra user API.
This will let you integrate your user management application with our API so you can manage user information between Invotra and your identity source, e.g. Azure.
You can create users using the ‘POST /users’ endpoint:
curl --location --request POST 'https://<your-invotra.com>/api/0.3/users' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api_key>' \ --data-raw '{ "username": "Jerry Whyte", "email": "jerry.whyte@akagera.com", "external_id": "jerry_whyte_123", "roles": [ "Organisational user" ], "status": "Active", "phone": "01-23-456-789", "mobile": "01-23-456-78", "firstname": "Jerry", "surname": "Whyte", "authname": { "saml": [ "N2IwNTFmYjYtOGQ2MS00Yjg0LTlhMTgtMzRkY2M5OTFhNDI2" ] } }'
Tip: You can make future updates to these users via an Invotra CSV importer by matching the “external_id” value in the API to the ‘ExternalId’ column in a CSV importer.
For a successful request the “Location” header in the response will contain the UUID of the user for further requests to the API:
Location: /api/0.3/users/870b2708-444b-4306-93be-4b33fed5470f
This can be used to check the current state of a user using the ‘GET /users/{user_id}’ endpoint, for example:
curl --location --request GET 'https://<your-invotra.com>/api/0.3/users/870b2708-444b-4306-93be-4b33fed5470f' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api_key>'
Updating user details
You can update users using the ‘PUT /users/{user_id}’ endpoint. Only the fields to be updated need to be sent as part of the update request, for example:
curl --location --request PUT 'https://<your-invotra.com>/api/0.3/users/870b2708-444b-4306-93be-4b33fed5470f' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api_key> \ --data-raw '{ "surname": "Jones" }'
For the full Invotra API specification: https://dev.invotra.com
0 Comments