Uptime
Request
This endpoint retrieves the uptime in milliseconds for a specific identifier within a given time range (up to 14 days). It supports querying using the following identifiers: secret and partner_node_id.
Endpoint:
GET /api/v1/uptimeURL:
https://stats.api.datagram.network/api/v1/uptimeQuery Parameters
secret
string
✅ Yes
Unique secret token identifying partner.
"pt_sec_abc123XYZ*"
partner_node_id
string
✅ Yes
Unique identifier of the external partner node.
"partner_98765zyxw"
started_at
integer
❌ No
Start time in Unix timestamp (milliseconds).
1678901234567
ended_at
integer
❌ No
End time in Unix timestamp (milliseconds).
1678912345678
You must provide both secret and partner_node_id identifiers.
Authentication
Use a valid organization token in the request header.
Authorization: Bearer <organization-token>Example Request
GET /api/v1/uptime?partner_node_id=dg-node-12&started_at=1741251728393&ended_at=1741252994872 HTTP/1.1
Host: stats.api.datagram.network
Authorization: <organization token>Responses
When the request is valid and successful, the API returns the uptime duration in milliseconds.
Response Body
uptime
integer
Total uptime in Unix timestamp (ms).
866222
partner_node_id
string
Identifier of the external partner node.
"partner_98765zyxw"
Example Response
{
  "data": {
    "uptime": 866222
    "partner_node_id": "partner_98765zyxw"
  }
}Returned when required parameters are missing or invalid or the time range exceeds 7 days.
Response Body
message
string
Description of the issue.
INVALID_PARAMETERS
status
integer
HTTP status code.
400 
Example Response
{
  "error": {
    "message": "INVALID_PARAMETERS",
    "status": 400
  }
}Returned when the authorization token is missing or invalid.
Response Body
message
string
Explanation of the auth failure.
"UNAUTHORIZED"
status
integer
HTTP status code.
401 
Example Response
{
  "error": {
    "message": "UNAUTHORIZED",
    "status": 401
  }
}Last updated
