API – User List
Use the API token for authorization. Read more in the article API token
- To get the list of users you need to send GET request to the following URI /api/v2/users/list.
- The request must contain the headings Content-Type: application/json;charset=UTF-8 and Authorization: Bearer xxxxxx.
Request example:
curl 'http://your-domain.davintoo.com/api/v2/users/list' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Instead of a local address https://your-domain.davintoo.com you need to use your instance address.
The query supports filtering by the following fields:
- (Fullname or email or login)fullname
- Positionposition
- Departmaentdepartment
- Citycity
- User tagstags
Example of a query with an email search:
curl 'https://your-domain.davintoo.com/api/v2/users/list?filter[fullname][email protected]' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Instead of a local address https://your-domain.davintoo.com you need to use your instance address.
Answer
In case of successful request (HTTP response code - 200), there will be reply result in JSON format of the form:
- results arraydata
- pagination object (information about the number of pages, the current page, the number of results)"pager":{"current":1,"count":16,"total":155,"countPerPage":10}
- In case of error (HTTP code response - 400) it returns JSON object with information about the error