1.1.2. Capture

GET /capture

get a capture.

Get a capture by its ID.

Query Parameters
  • id (integer) – Capture id

Example request:

GET /capture HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    A capture object

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "id": 1,
        "serial": "string",
        "statusb64": "string",
        "timeintb64": "string",
        "circbufb64": "string",
        "hmac": "string",
        "start-timestamp": "2020-08-27T10:57:29.275611",
        "end-timestamp": "2020-08-27T10:57:29.275611"
    }
    

  • 400 Bad Request

    bad input parameter

    Example response:

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

DELETE /capture

delete a capture

delete a capture

Query Parameters
  • id (integer) – Capture id

Status Codes
  • 204 No Content

    Capture has been 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

    No capture found

    Example response:

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

GET /captures

Get a list of captures ordered by ID.

Get a list of captures

Query Parameters
  • offset (integer) – Return captures starting from this index.

  • limit (integer) – Limit the number of captures returned.

  • tag_id (integer) – Only returns captures from tag_id.

Example request:

GET /captures HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    List of captures

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    [
        {
            "id": 1,
            "serial": "string",
            "statusb64": "string",
            "timeintb64": "string",
            "circbufb64": "string",
            "hmac": "string",
            "start-timestamp": "2020-08-27T10:57:29.275611",
            "end-timestamp": "2020-08-27T10:57:29.275611"
        }
    ]
    

  • 400 Bad Request

    bad input parameter

    Example response:

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

POST /captures

create a capture

Create a capture

Example request:

POST /captures HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "id": 1,
    "serial": "string",
    "statusb64": "string",
    "timeintb64": "string",
    "circbufb64": "string",
    "hmac": "string",
    "start-timestamp": "2020-08-27T10:57:29.275611",
    "end-timestamp": "2020-08-27T10:57:29.275611"
}
Status Codes
  • 201 Created

    Capture created

    Example response:

    HTTP/1.1 201 Created
    Content-Type: application/json
    
    {
        "id": 1,
        "serial": "string",
        "statusb64": "string",
        "timeintb64": "string",
        "circbufb64": "string",
        "hmac": "string",
        "start-timestamp": "2020-08-27T10:57:29.275611",
        "end-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
    
    {}
    

  • 409 Conflict

    a capture with the same id already exists

    Example response:

    HTTP/1.1 409 Conflict
    Content-Type: application/json
    
    {}
    

GET /capture

get a capture.

Get a capture by its ID.

Query Parameters
  • id (integer) – Capture id

Example request:

GET /capture HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    A capture object

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "id": 1,
        "serial": "string",
        "statusb64": "string",
        "timeintb64": "string",
        "circbufb64": "string",
        "hmac": "string",
        "start-timestamp": "2020-08-27T10:57:29.275611",
        "end-timestamp": "2020-08-27T10:57:29.275611"
    }
    

  • 400 Bad Request

    bad input parameter

    Example response:

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

DELETE /capture

delete a capture

delete a capture

Query Parameters
  • id (integer) – Capture id

Status Codes
  • 204 No Content

    Capture has been 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

    No capture found

    Example response:

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

GET /captures

Get a list of captures ordered by ID.

Get a list of captures

Query Parameters
  • offset (integer) – Return captures starting from this index.

  • limit (integer) – Limit the number of captures returned.

  • tag_id (integer) – Only returns captures from tag_id.

Example request:

GET /captures HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    List of captures

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    [
        {
            "id": 1,
            "serial": "string",
            "statusb64": "string",
            "timeintb64": "string",
            "circbufb64": "string",
            "hmac": "string",
            "start-timestamp": "2020-08-27T10:57:29.275611",
            "end-timestamp": "2020-08-27T10:57:29.275611"
        }
    ]
    

  • 400 Bad Request

    bad input parameter

    Example response:

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

POST /captures

create a capture

Create a capture

Example request:

POST /captures HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "id": 1,
    "serial": "string",
    "statusb64": "string",
    "timeintb64": "string",
    "circbufb64": "string",
    "hmac": "string",
    "start-timestamp": "2020-08-27T10:57:29.275611",
    "end-timestamp": "2020-08-27T10:57:29.275611"
}
Status Codes
  • 201 Created

    Capture created

    Example response:

    HTTP/1.1 201 Created
    Content-Type: application/json
    
    {
        "id": 1,
        "serial": "string",
        "statusb64": "string",
        "timeintb64": "string",
        "circbufb64": "string",
        "hmac": "string",
        "start-timestamp": "2020-08-27T10:57:29.275611",
        "end-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
    
    {}
    

  • 409 Conflict

    a capture with the same id already exists

    Example response:

    HTTP/1.1 409 Conflict
    Content-Type: application/json
    
    {}