# Reports

## POST /api/v1/org-unit/reports

> Create a new report request.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Reports"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ReportRequestFields":{"type":"object","required":["name","start","end"],"properties":{"name":{"type":"string"},"start":{"type":"string","format":"date-time","description":"timestamp from when to fetch data in UTC"},"end":{"type":"string","format":"date-time","description":"timestamp until when to fetch data in UTC"},"groupBy":{"$ref":"#/components/schemas/ReportGroupByOptions"},"filterBy":{"type":"array","description":"Filter results by a parameter. Use the format field-name == value.","default":[],"items":{"type":"string","pattern":"^(projectName|departmentName|clusterId)(==).+$"}}}},"ReportGroupByOptions":{"type":"string","nullable":true,"enum":["Nodepool","Project","Department","Cluster"]},"Report":{"allOf":[{"$ref":"#/components/schemas/ReportRequestFields"},{"$ref":"#/components/schemas/ReportCalculatedFields"}]},"ReportCalculatedFields":{"type":"object","required":["id","tenantId","createdAt","createdBy","status","statusUpdatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"tenantId":{"type":"integer","format":"int32","description":"ID of the tenant where the project is located."},"status":{"$ref":"#/components/schemas/ReportStatus"},"statusUpdatedAt":{"type":"string","format":"date-time"},"statusMessage":{"type":"string"}}},"ReportStatus":{"type":"string","enum":["Pending","Processing","Ready","Failed"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/reports":{"post":{"summary":"Create a new report request.","operationId":"create_report","tags":["Reports"],"requestBody":{"description":"Report to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequestFields"}}}},"responses":{"202":{"description":"Accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## GET /api/v1/org-unit/reports/{reportId}

> Get report

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Reports"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ReportId":{"name":"reportId","in":"path","required":true,"description":"The report id","schema":{"type":"string","format":"uuid"}}},"schemas":{"Report":{"allOf":[{"$ref":"#/components/schemas/ReportRequestFields"},{"$ref":"#/components/schemas/ReportCalculatedFields"}]},"ReportRequestFields":{"type":"object","required":["name","start","end"],"properties":{"name":{"type":"string"},"start":{"type":"string","format":"date-time","description":"timestamp from when to fetch data in UTC"},"end":{"type":"string","format":"date-time","description":"timestamp until when to fetch data in UTC"},"groupBy":{"$ref":"#/components/schemas/ReportGroupByOptions"},"filterBy":{"type":"array","description":"Filter results by a parameter. Use the format field-name == value.","default":[],"items":{"type":"string","pattern":"^(projectName|departmentName|clusterId)(==).+$"}}}},"ReportGroupByOptions":{"type":"string","nullable":true,"enum":["Nodepool","Project","Department","Cluster"]},"ReportCalculatedFields":{"type":"object","required":["id","tenantId","createdAt","createdBy","status","statusUpdatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"tenantId":{"type":"integer","format":"int32","description":"ID of the tenant where the project is located."},"status":{"$ref":"#/components/schemas/ReportStatus"},"statusUpdatedAt":{"type":"string","format":"date-time"},"statusMessage":{"type":"string"}}},"ReportStatus":{"type":"string","enum":["Pending","Processing","Ready","Failed"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/reports/{reportId}":{"get":{"summary":"Get report","operationId":"get_report_by_id","parameters":[{"$ref":"#/components/parameters/ReportId"}],"tags":["Reports"],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## DELETE /api/v1/org-unit/reports/{reportId}

> Delete report

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Reports"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ReportId":{"name":"reportId","in":"path","required":true,"description":"The report id","schema":{"type":"string","format":"uuid"}}},"responses":{"204NoContent":{"description":"No Content."},"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/org-unit/reports/{reportId}":{"delete":{"summary":"Delete report","operationId":"delete_report_by_id","parameters":[{"$ref":"#/components/parameters/ReportId"}],"tags":["Reports"],"responses":{"204":{"$ref":"#/components/responses/204NoContent"},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## GET /api/v1/org-unit/reports/{reportId}/file

> Download report

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Reports"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ReportId":{"name":"reportId","in":"path","required":true,"description":"The report id","schema":{"type":"string","format":"uuid"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/org-unit/reports/{reportId}/file":{"get":{"summary":"Download report","operationId":"download_report_by_id","parameters":[{"$ref":"#/components/parameters/ReportId"}],"tags":["Reports"],"responses":{"200":{"description":"Executed successfully.","content":{"text/csv":{}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-ai-docs.nvidia.com/api/2.19/organizations/reports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
