Queue Pending

This endpoint returns data which are not published

URL :

/queue/pending

/queue/pending?customerId={customerId}

/queue/pending?blockchain=BTC|ETH

Method : GET

X-HMAC required : YES

Request Query Parameters :

  • customerId optional

any

  • blockchain optional

BTC or ETH

Response

The response will be a JSON object containing an array of awaiting measurements to publish

interface Response {
  data: BinMesurement[]
}

Status Codes

The endpoint will return the following status codes based on the operation outcome:

  • 200OK: The request was successful.
  • 400Bad Request: The request was invalid.
  • 500Internal Server Error: An error occurred on the server while processing the request.

Example Request

GET /queue/pending HTTP/1.1
Content-Type: application/json
Host: localhost:3000
X-HMAC: 5d41402abc4b2a76b9719d911017c592

Example Response

[
  {
    "id": 9,
    "hashId": "521739b1-5f51-4245-b80b-e45465925347-2024-01-25T10:00:00Z",
    "bin": "521739b1-5f51-4245-b80b-e45465925347",
    "customer": "1",
    "data": "{\"alerts\":[{\"code\":\"SE001001\",\"ts\":\"2024-01-25T10:00:00Z\"}],\"bin\":\"521739b1-5f51-4245-b80b-e45465925347\",\"data\":{\"amp\":2,\"tmp\":3,\"ts\":\"2024-01-25T10:00:00Z\",\"vlt\":1}}",
    "hash": "d7da2a6fdcbf73dbace7b5de468fb37669593ce435d89322af65a291ac2679c9",
    "createdAt": "2024-01-25T10:00:00.000Z",
    "publishId": null
  }
]