1.2.3. Samples

GET /samples

Get unique samples for a tag in a given time range

Query Parameters
  • serial (string) – Tag serial (Required)

  • starttime (string) – start timestamp as an ISO-8601 string. (Required)

  • endtime (string) – end timestamp as an ISO-8601 string. (Required)

  • offset (integer) – Return samples starting from this index.

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

Example request:

GET /samples?serial=string&starttime=string&endtime=string HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    A list of samples from newest to oldest

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    [
        {
            "capture_id": 1,
            "id": 1,
            "location": {
                "capturesample_id": 1,
                "description": "string",
                "id": 1,
                "timestamp": "2020-08-27T10:57:29.275611"
            },
            "rh": 1.0,
            "temp": 1.0,
            "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
    
    {}