1.2.6. Locations¶
-
GET
/locations
¶ Get a list of locations for a tag ordered by most recent
- Query Parameters
serial (string) – Tag serial (Required)
starttime (string) – start timestamp as an ISO-8601 string.
endtime (string) – end timestamp as an ISO-8601 string.
Example request:
GET /locations?serial=string HTTP/1.1 Host: example.com
- Status Codes
200 OK –
A list of locations ordered from newest to oldest.
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "capturesample_id": 1, "description": "string", "id": 1, "timestamp": "2020-08-27T10:57:29.275611" } ]
invalid input, object invalid
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
Location not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
-
POST
/locations
¶ Add location information to a tag
- Status Codes
200 OK –
A capture object
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "capturesample_id": 1, "description": "string", "id": 1, "timestamp": "2020-08-27T10:57:29.275611" }
invalid input, object invalid
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
Not authorised. The user has no scanned this tag.
Example response:
HTTP/1.1 401 Unauthorized Content-Type: application/json {}
Not authorised. Invalid JWT.
Example response:
HTTP/1.1 403 Forbidden Content-Type: application/json {}
Parent resource not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
-
GET
/locations/{id}
¶ Get a list of locations for a tag ordered by most recent
- Parameters
id (integer) – Location ID
Example request:
GET /locations/{id} HTTP/1.1 Host: example.com
- Status Codes
200 OK –
A list of locations ordered from newest to oldest.
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "capturesample_id": 1, "description": "string", "id": 1, "timestamp": "2020-08-27T10:57:29.275611" }
invalid input, object invalid
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
Location not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
-
DELETE
/locations/{id}
¶ Delete a location
- Status Codes
Location deleted
Example response:
HTTP/1.1 204 No Content Content-Type: application/json {}
Bad input parameter
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
Not authorised. The user has no scanned this tag.
Example response:
HTTP/1.1 401 Unauthorized Content-Type: application/json {}
Not authorised. Invalid JWT.
Example response:
HTTP/1.1 403 Forbidden Content-Type: application/json {}
Location not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
-
PATCH
/locations/{id}
¶ Edit location information for a tag
- Status Codes
200 OK –
A capture object
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "capturesample_id": 1, "description": "string", "id": 1, "timestamp": "2020-08-27T10:57:29.275611" }
invalid input, object invalid
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
Not authorised. The user has no scanned this tag.
Example response:
HTTP/1.1 401 Unauthorized Content-Type: application/json {}
Not authorised. Invalid JWT.
Example response:
HTTP/1.1 403 Forbidden Content-Type: application/json {}
Parent resource not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}