Get stats
This endpoint gets stats for auto publishes .
URL : /config/auto-publish/stats
Method : GET
X-HMAC required : YES
interface AutoPublishStats {
id: number;
type: ALL | CUSTOMER;
period: DAILY | MONTHLY | WEEKLY;
time: number;
customerId: string;
createdAt: Date;
lastExec: Date;
error?: boolean;
publishes: number;
lastPublish: Publish | 'no-publish';
}
Status Codes
The endpoint will return the following status codes based on the operation outcome:
- 200
OK: The request was successful. - 400
Bad Request: No data are published. - 500
Internal Server Error: An error occurred on the server while processing the request.
Example Request
GET /config/auto-publish/stats HTTP/1.1
Content-Type: application/json
Host: localhost:3000
X-HMAC: 5d41402abc4b2a76b9719d911017c592
Example Response
{
"id": 1,
"type": "ALL",
"period": "MONTHLY",
"time": 4,
"customerId": 2,
"createdAt": "2024-01-28 16:00:00",
"publishes": 2,
"lastPublish": {
"id": 11,
"data": "[{\"alerts\":[{\"code\":\"SE001001\",\"ts\":\"2024-01-25T10:00:00Z\"}],\"bin\":\"521739b1-5f51-4245-b80b-e45465925347\",\"data\":{\"amp\":2,\"tmp\":3,\"ts\":\"2019-08-05T08:00:00Z\",\"vlt\":1}}]",
"bins": [
"521739b1-5f51-4245-b80b-e45465925347"
],
"rootHash": "d7da2a6fdcbf73dbace7b5de468fb37669593ce435d89322af65a291ac2679c9",
"blockchain": "ETH",
"txHash": "0x2018a5c62e7862a3b45dcb920a8c48e7e1c6e4155fc8db25bb6c28f49212f08e",
"publishedAt": "2020-02-12T11:02:21.458Z",
"autoPublishId": null
}
}
Table of Contents
