Uptimes
Request
This endpoint returns the uptime in milliseconds for one or more partner nodes (partner_node_id[]) across a specified time window. 
Endpoint
GET /api/v1/uptimesURL:
https://stats.api.datagram.network/api/v1/uptimesQuery Parameters
secret
string
✅ Yes
Unique secret token identifying partner.
"pt_sec_abc123XYZ!*"
partner_node_id[]
string[]
✅ Yes
Retrieve uptime for multiple partner node IDs (up to 5 maximum at a time.
["node_123", "node_456"]
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/uptimes&partner_node_id[]=dg-node-1&partner_node_id[]=dg-node-2&started_at=1741251728393&ended_at=1741252994872 HTTP/1.1
Host: stats.api.datagram.network
Authorization: <organization token>print(response.json())Responses
The request was successful and uptime data was retrieved for the specified partner nodes.
Response Body
uptime
integer
Total uptime in Unix timestamp (ms).
86400000
partner_node_id
string
Retrieve uptime for a single partner node ID.
"partner_12345"
Example Response
{
  "data": [
    {
      "uptime": 1888888,
      "partner_node_id": "partner_12345"
    },
      {
      "uptime": 1999999,
      "partner_node_id": "partner_67890"
    }
  ]
}Returns if the parameters are malformed or missing, or the time range exceeds the maximum allowed.
Response Body
message
string
Description of the issue.
INVALID_PARAMETERS
status
integer
HTTP status code.
400 (Bad Request)
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 (Unauthorized)
Example Response
{
  "error": {
    "message": "UNAUTHORIZED",
    "status": 401
  }
}Last updated
