Reports

Create a new report request.

SecuritybearerAuth
Request
Request Body schema: application/json
required

Report to create.

name
required
string
start
required
string <date-time>

timestamp from when to fetch data in UTC

end
required
string <date-time>

timestamp until when to fetch data in UTC

groupBy
string or null (ReportGroupByOptions)
Enum: "Nodepool" "Project" "Department" "Cluster"
filterBy
Array of strings
Default: []

Filter results by a parameter. Use the format field-name == value.

Responses
202

Accepted.

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

post/api/v1/org-unit/reports
Request samples
application/json
{
  • "name": "2023 GPU report",
  • "start": "2023-06-07T09:09:18.211Z",
  • "end": "2023-06-07T12:09:18.211Z",
  • "groupBy": "Nodepool",
  • "filterBy": [
    ]
}
Response samples
application/json
{
  • "name": "2023 GPU report",
  • "start": "2023-06-07T09:09:18.211Z",
  • "end": "2023-06-07T12:09:18.211Z",
  • "groupBy": "Nodepool",
  • "filterBy": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "createdBy": "user@run.ai",
  • "tenantId": 2,
  • "status": "Pending",
  • "statusUpdatedAt": "2019-08-24T14:15:22Z",
  • "statusMessage": "Report in queue"
}

Get report

SecuritybearerAuth
Request
path Parameters
reportId
required
string <uuid>

The report id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

get/api/v1/org-unit/reports/{reportId}
Response samples
application/json
{
  • "name": "2023 GPU report",
  • "start": "2023-06-07T09:09:18.211Z",
  • "end": "2023-06-07T12:09:18.211Z",
  • "groupBy": "Nodepool",
  • "filterBy": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "createdBy": "user@run.ai",
  • "tenantId": 2,
  • "status": "Pending",
  • "statusUpdatedAt": "2019-08-24T14:15:22Z",
  • "statusMessage": "Report in queue"
}

Delete report

SecuritybearerAuth
Request
path Parameters
reportId
required
string <uuid>

The report id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Responses
204

No Content.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

delete/api/v1/org-unit/reports/{reportId}
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Download report

SecuritybearerAuth
Request
path Parameters
reportId
required
string <uuid>

The report id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

get/api/v1/org-unit/reports/{reportId}/file
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}