For the complete documentation index, see llms.txt. This page is also available as Markdown.

Report

Gets a list of reports

get

Lists all reports and their rules

Authorizations
OAuth2applicationRequired
Token URL:
Path parameters
serviceIdanyRequired

serviceId

Responses
200

OK

application/json
namestringOptionalExample: My Department Report
reportIdintegerOptionalExample: 2
get/service/{serviceId}/report
GET /api/service/{serviceId}/report HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "name": "My Department Report",
    "options": [
      {
        "method": "matchPath",
        "value": "pub/ubuntu/*"
      }
    ],
    "reportId": 2,
    "tags": [
      {
        "key": "billingID",
        "value": "1234"
      }
    ],
    "vhost": {
      "BillingTemplateId": 12314,
      "clientId": "12345",
      "dns": "cdn.i3d.net",
      "enabled": true,
      "hash": "JJUSMXH",
      "name": "VHost name",
      "originId": 12314,
      "path": "/o1/cdn"
    }
  }
]

Creates a Report

post

A report is created based of rules, this call allows you to define a set of rules to report on

Authorizations
OAuth2applicationRequired
Token URL:
Path parameters
serviceIdanyRequired

serviceId

Body
Responses
post/service/{serviceId}/report
POST /api/service/{serviceId}/report HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 142

{
  "rule": {
    "name": "My Department Report",
    "options": [
      {
        "method": "matchPath",
        "value": "pub/ubuntu/*"
      }
    ],
    "tags": [
      {
        "key": "billingID",
        "value": "1234"
      }
    ]
  }
}

Generates a report by its reportId

get

A report is created based of rules, this call create a report based on the RuleID

Authorizations
OAuth2applicationRequired
Token URL:
Path parameters
serviceIdanyRequired

serviceId

reportIdanyRequired

reportId to run

Query parameters
startTimestampanyOptional

start time range, unix timestamp, default 24 hours ago

endTimestampanyOptional

end time range, unix timestamp, default now

Responses
200

OK

application/json
endTimestringOptional
startTimestringOptional
get/service/{serviceId}/report/{reportId}
GET /api/service/{serviceId}/report/{reportId} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "endTime": "text",
  "regions": [
    {
      "billingTemplate": {
        "id": 2,
        "pricePerGbit": 0.09,
        "region": "nlrtm1"
      },
      "cost": 1,
      "name": "text",
      "requests": 1,
      "tx": 1,
      "txGbit": 1
    }
  ],
  "rule": {
    "name": "My Department Report",
    "options": [
      {
        "method": "matchPath",
        "value": "pub/ubuntu/*"
      }
    ],
    "reportId": 2,
    "tags": [
      {
        "key": "billingID",
        "value": "1234"
      }
    ],
    "vhost": {
      "BillingTemplateId": 12314,
      "clientId": "12345",
      "dns": "cdn.i3d.net",
      "enabled": true,
      "hash": "JJUSMXH",
      "name": "VHost name",
      "originId": 12314,
      "path": "/o1/cdn"
    }
  },
  "startTime": "text",
  "totals": {
    "cost": 1,
    "requests": 1,
    "tx": 1,
    "txGbit": 1
  }
}

Deletes a Report

delete

A report is created based of rules, this call allows you to delete a rule

Authorizations
OAuth2applicationRequired
Token URL:
Path parameters
serviceIdanyRequired

serviceId

reportIdanyRequired

reportId to run

Responses
202

Accepted

No content

delete/service/{serviceId}/report/{reportId}
DELETE /api/service/{serviceId}/report/{reportId} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Last updated

Was this helpful?