Piano Analytics’ user management API will help you list, create, suspend and delete users in your organization.
The API’s URL is the following: https://api.atinternet.io
Authentication
You will first need to create an API-Key from your Piano Analytics profile page.
To authenticate, pass your API-Key in header of each API request, using the following header: x-api-key=ACCESSKEY_SECRETKEY
Info
This service is reserved for administrators of organizations.
User management
List users
Purpose : get the list of users from your organization
Method | GET |
---|---|
URL | /v1/access/users |
Response code | 200 |
Response description | Array of user objects |
Payload:
[
{
"id": 0,
"creationDate": "string",
"closingDate": "string",
"cultureCode": "string",
"email": "string",
"firstName": "string",
"lastName": "string",
}
]
Create users
Purpose : create a user account and add it to an organization
Method | POST |
---|---|
URL | /v1/access/user/create |
Response code | 204 |
Response description | The user's account is successfully created and added to the organization |
Request body
{
"email": "string",
"firstName": "string",
"lastName": "string",
}
Suspend users
Purpose: suspend a user account on a specific date. This indicates that as of this date, the user's rights will be suspended. The user still belongs to the organization's groups, but their rights are disabled. It is possible to reactivate the user's account by removing the end date. To do this, make an API call with the "endDate" parameter set to null.
Method | PATCH |
---|---|
URL | /v1/access/user/enddate |
Response code | 204 |
Response description | The user's account is successfully updated |
Request body
{
"email": "string",
"endDate": "string"
}
Dates must be in yyyy-mm-dd format.
Delete users
Purpose: Delete the organization's user account from their email address
Method | POST |
---|---|
URL | /v1/access/user/delete |
Response code | 204 |
Response description | The user's account is successfully deleted from the organization |
Request body
{
"email": "string"
}
Site management
Purpose: get list of sites from your organization
Method | GET |
---|---|
URL | /v1/access/sites |
Response code | 200 |
Response description | Array of site objects |
Payload
[
{
"contractId": 0,
"closingDate": "string",
"siteId": 0,
"siteName": "string"
}
]
Dates must be in yyyy-mm-dd format.
Limitations & restrictions
This service is reserved for administrators of organizations.
For security reasons, it is not possible to delete or suspend an administrator or delegate user account via API. An administrator must first remove this status from the access rights management interface.