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"
        }
    }
    

  • 403 Forbidden

    invalid JWT

    Example response:

    HTTP/1.1 403 Forbidden
    Content-Type: application/json
    
    {}
    

DELETE /me

Delete current user.

Status Codes
  • 204 No Content

    User deleted

    Example response:

    HTTP/1.1 204 No Content
    Content-Type: application/json
    
    {}
    

  • 400 Bad Request

    Bad input parameter

    Example response:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json
    
    {}
    

  • 404 Not Found

    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
        }
    ]
    

  • 400 Bad Request

    invalid input, object invalid

    Example response:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json
    
    {}
    

  • 401 Unauthorized

    Not authorised. HMAC does not correspond to input data or invalid JWT.

    Example response:

    HTTP/1.1 401 Unauthorized
    Content-Type: application/json
    
    {}
    

  • 404 Not Found

    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
    }
    

  • 400 Bad Request

    Invalid input, object invalid

    Example response:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json
    
    {}
    

  • 401 Unauthorized

    Not authorised. HMAC does not correspond to input data.

    Example response:

    HTTP/1.1 401 Unauthorized
    Content-Type: application/json
    
    {}
    

  • 403 Forbidden

    Not authorised. Invalid JWT.

    Example response:

    HTTP/1.1 403 Forbidden
    Content-Type: application/json
    
    {}
    

  • 404 Not Found

    Parent tag or user not found.

    Example response:

    HTTP/1.1 404 Not Found
    Content-Type: application/json
    
    {}
    

  • 409 Conflict

    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"
        }
    ]
    

  • 403 Forbidden

    Invalid JWT

    Example response:

    HTTP/1.1 403 Forbidden
    Content-Type: application/json
    
    {}
    

POST /me/tagviews

Post a tag view

Status Codes
  • 201 Created

    TagView created

    Example response:

    HTTP/1.1 201 Created
    Content-Type: application/json
    
    {
        "tagserial": "string",
        "id": 1,
        "timestamp": "2020-08-27T10:57:29.275611"
    }
    

  • 400 Bad Request

    Invalid input, object invalid

    Example response:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json
    
    {}
    

  • 403 Forbidden

    Invalid JWT

    Example response:

    HTTP/1.1 403 Forbidden
    Content-Type: application/json
    
    {}
    

  • 404 Not Found

    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"
    }
    

  • 403 Forbidden

    Invalid JWT

    Example response:

    HTTP/1.1 403 Forbidden
    Content-Type: application/json
    
    {}
    

  • 404 Not Found

    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
  • 204 No Content

    TagView deleted

    Example response:

    HTTP/1.1 204 No Content
    Content-Type: application/json
    
    {}
    

  • 400 Bad Request

    Bad input.

    Example response:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json
    
    {}
    

  • 404 Not Found

    TagView not found

    Example response:

    HTTP/1.1 404 Not Found
    Content-Type: application/json
    
    {}