Internal Spaghetti API

Use the Spaghetti API to:

  • Create a Spaghetti diagram.

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

Companies Endpoints

Functionality Method Endpoint
create spaghetti diagram POST /api/v2/spaghetti

Endpoints

Create spaghetti diagram

POST /api/v2/spaghetti

  • Headers:
    • X-User-Email
    • X-User-Project
    • X-User-Token

Request Fields

Field Required Type Description
from required number Date of start in UNIX format
to required number Date of end in UNIX format
sublocation_uid required string Area unique id
trackable_uids optional array Array of trackable unique id

Response

CSV file

Example Request

{
  "from": 1707300360000,
  "to": 1707318360000,
  "trackable_uids": [
    "niCUrf1gRr2GJHdWrHHIhw",
    "d538Dt_cQoqr8bak_EmX_A",
    "REjhJigPTMK3uxLf7XT_pg"
  ],
  "sublocation_uid": "OAKJFjDzSKa-NciIeiAetA"
}

Example Response

uid,x,y,timestamp/
  ...
d538Dt_cQoqr8bak_EmX_A,314,-1539,1707313770312/
niCUrf1gRr2GJHdWrHHIhw,70,-1558,1707313771276/
d538Dt_cQoqr8bak_EmX_A,315,-1547,1707313771312/
niCUrf1gRr2GJHdWrHHIhw,81,-1544,1707313772278/
d538Dt_cQoqr8bak_EmX_A,328,-1554,1707313772312/
niCUrf1gRr2GJHdWrHHIhw,83,-1549,1707313773276/
d538Dt_cQoqr8bak_EmX_A,296,-1593,1707313773314/
niCUrf1gRr2GJHdWrHHIhw,85,-1544,1707313774276/
d538Dt_cQoqr8bak_EmX_A,296,-1593,1707313774311/
d538Dt_cQoqr8bak_EmX_A,317,-1618,1707313783311/
d538Dt_cQoqr8bak_EmX_A,314,-1621,1707313784311/
d538Dt_cQoqr8bak_EmX_A,308,-1640,1707313785311/
d538Dt_cQoqr8bak_EmX_A,284,-1700,1707313786311/
d538Dt_cQoqr8bak_EmX_A,271,-1712,1707313787311/
d538Dt_cQoqr8bak_EmX_A,236,-1694,1707313788311/
niCUrf1gRr2GJHdWrHHIhw,13,-1575,1707313789275/
d538Dt_cQoqr8bak_EmX_A,201,-1675,1707313789311/
niCUrf1gRr2GJHdWrHHIhw,-12,-1583,1707313790275/
d538Dt_cQoqr8bak_EmX_A,167,-1657,1707313790311/
niCUrf1gRr2GJHdWrHHIhw,-53,-1594,1707313791275/
d538Dt_cQoqr8bak_EmX_A,132,-1639,1707313791311/
niCUrf1gRr2GJHdWrHHIhw,-65,-1595,1707313792275/
d538Dt_cQoqr8bak_EmX_A,89,-1651,1707313792311/
niCUrf1gRr2GJHdWrHHIhw,-39,-1593,1707313793276/
d538Dt_cQoqr8bak_EmX_A,30,-1657,1707313793310/
niCUrf1gRr2GJHdWrHHIhw,4,-1601,1707313794275/
d538Dt_cQoqr8bak_EmX_A,135,-1658,1707313794311/
niCUrf1gRr2GJHdWrHHIhw,106,-1601,1707313795275/
d538Dt_cQoqr8bak_EmX_A,231,-1631,1707313795310/
niCUrf1gRr2GJHdWrHHIhw,106,-1580,1707313796275/
d538Dt_cQoqr8bak_EmX_A,264,-1597,1707313796310/
niCUrf1gRr2GJHdWrHHIhw,104,-1572,1707313797275/
d538Dt_cQoqr8bak_EmX_A,295,-1585,1707313797310/
niCUrf1gRr2GJHdWrHHIhw,3,-1567,1707313807274/
d538Dt_cQoqr8bak_EmX_A,208,-1591,1707313807310/
niCUrf1gRr2GJHdWrHHIhw,-39,-1584,1707313808274/
  ...

Errors

Error Status Error Type Error Body Description
422 Validation Error '"from" is required' from must be specify
422 Validation Error '"to" is required' to must be specify
422 Validation Error '"sublocation_uid" is required' sublocation_uid must be specify
422 Validation Error '"trackable_uids" should contains uids' trackable_uids must be an array of uids
422 Validation Error '"from" should be less then "to"' to must be grater from

results matching ""

    No results matching ""