GET - List of users with history
List of users with history id
Request
- Method:
GET - Endpoint:
/users/history - Base URL:
https://api.targpatrol.com/api/v1 - Operation ID:
list-of-users-with-history
Authorization
This endpoint requires an external API key.
x-api-key: {your_external_api_key}
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
limit | query | no | integer | include first N items of a resource collection |
offset | query | no | number | exclude first N items of a resource collection |
sort | query | no | string | sort items in a resource collection |
q | query | no | string | This parameter is used for quick search across text fields. |
id | query | no | string | filter by ids |
firstName | query | no | string | filter by first name |
lastName | query | no | string | filter by last name |
role | query | no | string | filter by role |
status | query | no | string | filter by status |
email | query | no | string | filter by email |
locationId | query | no | string | filter by locations |
tags | query | no | string | filter by tags |
Responses
200 OK
Content-Type: application/json
Schema: object
Schema
{
"allOf": [
{
"$ref": "#/components/schemas/PageResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserHistoryResponse"
}
}
}
}
]
}
Example: example-1
{
"data": [
{
"id": "be63c536-6cf3-4866-8970-37a956e3f403",
"firstName": "John",
"middleName": "Lee",
"lastName": "Fox",
"employeeNo": "1234",
"employeePin": "4321",
"email": "fox.john@gmail.com",
"phone": "80291110099",
"locale": "en-US",
"role": "ADMIN",
"status": "ACTIVE",
"photoId": "a7c6f740-2a42-449c-a03b-b8d36aa4709a",
"locationIds": [
"99b770c0-2396-43d3-b109-85a9d73df7b1",
"e1dfeaba-4318-4411-be91-f8af5214dd02"
],
"tags": [
"tag1",
"tag2"
],
"userLinked": true,
"externalId": "external-user-1",
"gpsTracking": true,
"historyId": 1
}
],
"meta": {
"offset": 0,
"limit": 20,
"count": 1,
"sort": [
{
"property": "id",
"direction": "asc"
}
],
"filter": [
{
"property": "role",
"value": "USER"
},
{
"property": "firstName",
"value": "John"
}
]
}
}
401 Unauthorized
500 Internal Server Error
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "internal server error",
"code": "internal.server.error",
"timestamp": "2023-03-07T05:57:59.315Z"
}