Internal Reports API
Use the Positions API to:
- Create obsolete report
- Get obsolete report
HTTP Headers
The HTTP headers are used to access all RTLS APIs are listed below. Before submitting requests to the company API, set the following headers.
| Header Name | Example Value | Description |
|---|---|---|
| X-User-Email | admin@example.com | Email of the user performing HTTP requests to the API. |
| X-User-Token | Drv3yU7PdyqUMtr89erZ | Token allowing user access to the API. |
NOTE: Headers are applying to public routes, routes starts with /api/private/... access from localhost and do not
require headers
Set header X-USER-EMAIL
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the email
address returned in the response, set: X-USER-EMAIL = data.email
Set header X-USER-TOKEN
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the
authentication token returned in the response, set: X-USER-TOKEN = data.token
Set header X-USER-PROJECT
Send a request to get projects using GET api/projects/ described in the Projects API.
You must send this request with headers X-USER-EMAIL and X-USER-TOKEN already set. Using the project UID returned in
the response, set:
X-USER-PROJECT = projects[i].uid
Reports Endpoints
| Functionality | Method | Endpoint |
|---|---|---|
| create obsolete report | POST | /api/v2/obsolete/report |
| get obsolete report | GET | /api/v2/obsolete/report/${uid} |
Create obsolete report
POST /api/v2/obsolete/report
- Headers:
- X-User-Email
- X-User-Project
- X-User-Token
Request Fields
| Field | Required | Type | Description |
|---|---|---|---|
| type | require | string | Report type
|
| startDate | required | number | Date in UNIX format |
| endDate | required | number | Date in UNIX format |
| step | required | number | Step. Minimum value 60000 |
| trackables | optional | Array | Array of trackable unique id |
| sublocation_uid | required | string | Area unique id |
Response fields
| Field | Description |
|---|---|
| user | User object |
| user.email | User email |
| project | Project object |
| project.uid | Project unique id |
| project.name | Project name |
| company | Company object |
| company.uid | Company unique id |
| company.name | Company name |
| uid | Report unique id |
| type | Report type
|
| filterDescription | Filter |
| input | Requested fields |
| status | Current report status: 0 |
Example Request
{
"type": "heatmap_report",
"start": 1707300360,
"end": 1707318360,
"brashAdaptiveCoef": 1,
"uids": [
"niCUrf1gRr2GJHdWrHHIhw",
"d538Dt_cQoqr8bak_EmX_A",
"REjhJigPTMK3uxLf7XT_pg"
],
"names": [
"1",
"3",
"4"
],
"isCustomInterval": true,
"sublocation_uid": "OAKJFjDzSKa-NciIeiAetA"
}
Example Response
{
"user": {
"email": "redpoint_positioning_impersonate@VSZOSpfOSf_vE2AKMvwk3w"
},
"project": {
"uid": "UlG5a4gRTpm_MSt6UkbjLg",
"name": "Paul_Project_2024_001_1"
},
"company": {
"uid": "VSZOSpfOSf_vE2AKMvwk3w",
"name": "Paul_company_2024_001_1"
},
"uid": "Ai1eFKz7QbiYe7lW-zHeNQ",
"type": "HEATMAP",
"filterDescription": {},
"input": {
"type": "heatmap_report",
"start": 1707300360,
"end": 1707318360,
"brashAdaptiveCoef": 1,
"uids": [
"niCUrf1gRr2GJHdWrHHIhw",
"d538Dt_cQoqr8bak_EmX_A",
"REjhJigPTMK3uxLf7XT_pg"
],
"names": [
"1",
"3",
"4"
],
"isCustomInterval": true,
"sublocation_uid": "OAKJFjDzSKa-NciIeiAetA",
"project_uid": "UlG5a4gRTpm_MSt6UkbjLg",
"timeZoneOffset": 0
},
"status": 0
}
Errors
| Error Status | Error Type | Error Body | Description |
|---|---|---|---|
| 422 | Validation Error | Error in Request Fields |
Get obsolete report
GET /api/v2/obsolete/report/${uid}
GET /api/v2/obsolete/report/Ai1eFKz7QbiYe7lW-zHeNQ
- Headers:
- X-User-Email
- X-User-Project
- X-User-Token
Response fields
| Field | Description |
|---|---|
| id | |
| id_txt | Report unique id |
| request | |
| status | Report current generation status 0..100 |
| status2 | |
| uid | Report unique id |
| error | Error description if generation fails |
| input | Report details |
| input.type | Report type
|
| input.start | Date in UNIX format |
| input.end | Date in UNIX format |
| input.brashAdaptiveCoef | |
| input.uids | Array of trackable unique id |
| input.names | List on trackable names |
| input.isCustomInterval | |
| input.sublocation_uid | Area unique id |
| input.project_uid | Project unique id |
| input.timeZoneOffset | |
| output.bbox | Minimal and maximum coordinates of generated report |
| output.bounds | Coordinates of generated image located on Site wise |
{
"bbox": {
"xMin": -1209,
"xMax": 1754,
"yMin": -3052.1,
"yMax": 3765.1
},
"bounds": [
[
-0.0002741738191685677,
-0.00010860592620648023
],
[
0.00033822346795700476,
0.0001575639326436446
]
]
}
Example Response
- response on
0%
{
"id": 6,
"id_txt": "Ai1eFKz7QbiYe7lW-zHeNQ",
"request": "#statistic {\"type\":\"heatmap_report\",\"start\":1707300360,\"end\":1707318360,\"brashAdaptiveCoef\":1,\"uids\":[\"niCUrf1gRr2GJHdWrHHIhw\",\"d538Dt_cQoqr8bak_EmX_A\",\"REjhJigPTMK3uxLf7XT_pg\"],\"names\":[\"1\",\"3\",\"4\"],\"isCustomInterval\":true,\"sublocation_uid\":\"OAKJFjDzSKa-NciIeiAetA\",\"project_uid\":\"UlG5a4gRTpm_MSt6UkbjLg\",\"timeZoneOffset\":0}",
"status": 0,
"status2": 0,
"uid": "Ai1eFKz7QbiYe7lW-zHeNQ",
"error": null,
"input": {
"type": "heatmap_report",
"start": 1707300360,
"end": 1707318360,
"brashAdaptiveCoef": 1,
"uids": [
"niCUrf1gRr2GJHdWrHHIhw",
"d538Dt_cQoqr8bak_EmX_A",
"REjhJigPTMK3uxLf7XT_pg"
],
"names": [
"1",
"3",
"4"
],
"isCustomInterval": true,
"sublocation_uid": "OAKJFjDzSKa-NciIeiAetA",
"project_uid": "UlG5a4gRTpm_MSt6UkbjLg",
"timeZoneOffset": 0
}
}
- response on
100%
{
"id": 6,
"id_txt": "Ai1eFKz7QbiYe7lW-zHeNQ",
"request": "#statistic {\"type\":\"heatmap_report\",\"start\":1707300360,\"end\":1707318360,\"brashAdaptiveCoef\":1,\"uids\":[\"niCUrf1gRr2GJHdWrHHIhw\",\"d538Dt_cQoqr8bak_EmX_A\",\"REjhJigPTMK3uxLf7XT_pg\"],\"names\":[\"1\",\"3\",\"4\"],\"isCustomInterval\":true,\"sublocation_uid\":\"OAKJFjDzSKa-NciIeiAetA\",\"project_uid\":\"UlG5a4gRTpm_MSt6UkbjLg\",\"timeZoneOffset\":0}",
"status": 100,
"status2": 0,
"uid": "Ai1eFKz7QbiYe7lW-zHeNQ",
"error": null,
"input": {
"type": "heatmap_report",
"start": 1707300360,
"end": 1707318360,
"brashAdaptiveCoef": 1,
"uids": [
"niCUrf1gRr2GJHdWrHHIhw",
"d538Dt_cQoqr8bak_EmX_A",
"REjhJigPTMK3uxLf7XT_pg"
],
"names": [
"1",
"3",
"4"
],
"isCustomInterval": true,
"sublocation_uid": "OAKJFjDzSKa-NciIeiAetA",
"project_uid": "UlG5a4gRTpm_MSt6UkbjLg",
"timeZoneOffset": 0
},
"output": {
"bbox": {
"xMin": -1209,
"xMax": 1754,
"yMin": -3052.1,
"yMax": 3765.1
},
"bounds": [
[
-0.0002741738191685677,
-0.00010860592620648023
],
[
0.00033822346795700476,
0.0001575639326436446
]
]
}
}
Errors
| Error Status | Error Type | Error Body | Description |
|---|---|---|---|
| 404 | Not Found | Report ' |
Report with uid not found |