Add Item/s to the Queue
This endpoint accepts an input object containing data and alerts with customerID, processes it, and creates data and then adds it to the queue.
URL : /queue/add/{customerId}
Method : POST
X-HMAC required : YES
Request Body Parameters : Base Input Object
Request URL Parameters : {customerId}
Response
The response will be a JSON object containing a message found duplicities and data stored for publish.
interface Response {
message: string
data: {
duplicates: BinMesurement[]
toPublish: BinMesurement[]
}
}
Example Request
POST /queue/add/1 HTTP/1.1
Content-Type: application/json
X-HMAC: 5d41402abc4b2a76b9719d911017c592
{
"data": [
{
"bin": "521739b1-5f51-4245-b80b-e45465925347",
"data": {
"vlt": 1,
"amp": 2,
"tmp": 3,
"ts": "2024-01-25T10:00:00Z"
},
"alerts": [
{
"code": "SE001001",
"ts": "2024-01-25T10:00:00Z"
}
]
}
]
}
Example Response
{
"message": "Data added to queue",
"data": {
"duplicates": [],
"toPublish": [
{
"bin": "521739b1-5f51-4245-b80b-e45465925347",
"data": {
"vlt": 1,
"amp": 2,
"tmp": 3,
"ts": "2024-01-25T10:00:00Z"
},
"alerts": [
{
"code": "SE001001",
"ts": "2024-01-25T10:00:00Z"
}
]
}
]
}
}
Table of Contents
