1.2.5. Me¶
-
GET
/me
¶ Get current user from the Auth0 access token.
Auth0 ID of the user.
Example request:
GET /me HTTP/1.1 Host: example.com
- Status Codes
200 OK –
A user object
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "oauth_id": "string", "roles": "string", "userinfo": { "family_name": "string", "given_name": "string", "locale": "string", "name": "string", "nickname": "string", "picture": "string", "sub": "string", "updated_at": "2020-08-27T10:57:29.275611" } }
invalid JWT
Example response:
HTTP/1.1 403 Forbidden Content-Type: application/json {}
-
DELETE
/me
¶ Delete current user.
- Status Codes
User 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 {}
User not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
1.2.5.1. Captures¶
-
GET
/me/captures
¶ Get a list of captures taken by the current user ordered by most recent first.
- Query Parameters
distinctOnTag (boolean) – Return only the latest capture for each scanned tag.
Example request:
GET /me/captures HTTP/1.1 Host: example.com
- Status Codes
200 OK –
A list of capture objects ordered from newest to oldest
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "batvoltagemv": 1, "tagserial": "string", "cursorpos": 1, "id": 1, "loopcount": 1, "md5": "string", "status": { "brownout": true, "clockfail": true, "id": 1, "lpm5wakeup": true, "misc": true, "parent_capture": 1, "resetsalltime": 1, "supervisor": true, "watchdog": true }, "timeintmins": 1, "timestamp": "2020-08-27T10:57:29.275611", "version": 1 } ]
invalid input, object invalid
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
Not authorised. HMAC does not correspond to input data or invalid JWT.
Example response:
HTTP/1.1 401 Unauthorized Content-Type: application/json {}
Tag not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
-
POST
/me/captures
¶ Create a capture for a user
- Status Codes
200 OK –
A capture object
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "batvoltagemv": 1, "tagserial": "string", "cursorpos": 1, "id": 1, "loopcount": 1, "md5": "string", "status": { "brownout": true, "clockfail": true, "id": 1, "lpm5wakeup": true, "misc": true, "parent_capture": 1, "resetsalltime": 1, "supervisor": true, "watchdog": true }, "timeintmins": 1, "timestamp": "2020-08-27T10:57:29.275611", "version": 1 }
Invalid input, object invalid
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
Not authorised. HMAC does not correspond to input data.
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 tag or user not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
Conflict. A capture with this HMAC already exists. Dead battery or replay attack.
Example response:
HTTP/1.1 409 Conflict Content-Type: application/json {}
1.2.5.2. TagViews¶
-
GET
/me/tagviews
¶ Get a list of TagViews for the current user.
Auth0 ID of the user.
- Query Parameters
distinctOnTag (boolean) – Return only the latest TagView for each scanned tag.
Example request:
GET /me/tagviews HTTP/1.1 Host: example.com
- Status Codes
200 OK –
A list of tagview objects ordered from newest to oldest.
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "tagserial": "string", "id": 1, "timestamp": "2020-08-27T10:57:29.275611" } ]
Invalid JWT
Example response:
HTTP/1.1 403 Forbidden Content-Type: application/json {}
-
POST
/me/tagviews
¶ Post a tag view
- Status Codes
TagView created
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "tagserial": "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 {}
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
/me/tagviews/{id}
¶ Get a tagview for the current user
Auth0 ID of the user.
- Parameters
id (integer) – Tag view ID
Example request:
GET /me/tagviews/{id} HTTP/1.1 Host: example.com
- Status Codes
200 OK –
A tagview object
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "tagserial": "string", "id": 1, "timestamp": "2020-08-27T10:57:29.275611" }
Invalid JWT
Example response:
HTTP/1.1 403 Forbidden Content-Type: application/json {}
TagView not found.
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}
-
DELETE
/me/tagviews/{id}
¶ Delete tag view from the current user.
- Status Codes
TagView deleted
Example response:
HTTP/1.1 204 No Content Content-Type: application/json {}
Bad input.
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json {}
TagView not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json {}