NVIDIA Run:ai Reports API

The Reports API from NVIDIA Run:ai — 5 operation(s) for reports.

OpenAPI Specification

runai-reports-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: latest
  description: '# Introduction


    The NVIDIA Run:ai Control-Plane API reference is a guide that provides an easy-to-use programming interface for adding various tasks to your application, including workload submission, resource management, and administrative operations.


    NVIDIA Run:ai APIs are accessed using *bearer tokens*. To obtain a token, you need to create a **Service account** through the NVIDIA Run:ai user interface.

    To create a service account, in your UI, go to Access → Service Accounts (for organization-level service accounts) or User settings → Access Keys (for user access keys), and create a new one.


    After you have created a new service account, you will need to assign it access rules.

    To assign access rules to the service account, see [Create access rules](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/accessrules#create-or-delete-rules).

    Make sure you assign the correct rules to your service account. Use the [Roles](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/roles) to assign the correct access rules.


    To get your access token, follow the instructions in [Request a token](https://run-ai-docs.nvidia.com/saas/reference/api/rest-auth/#request-an-api-token).

    '
  title: NVIDIA Run:ai Access Keys Reports API
  x-logo:
    url: https://api.redocly.com/registry/raw/runai-xq8/saas/latest/public/runai-logo-api.png
    altText: NVIDIA Run:ai
    href: https://run.ai
  license:
    name: NVIDIA Run:ai
    url: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/
servers:
- url: https://app.run.ai
security:
- bearerAuth: []
tags:
- name: Reports
paths:
  /api/v1/org-unit/reports:
    get:
      summary: List reports
      operationId: list_reports
      tags:
      - Reports
      parameters:
      - $ref: '#/components/parameters/ReportsFilterBy'
      - $ref: '#/components/parameters/ReportsSortBy'
      - $ref: '#/components/parameters/SortOrder'
      - $ref: '#/components/parameters/Offset'
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Search'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                - reports
                properties:
                  reports:
                    $ref: '#/components/schemas/Reports'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    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'
  /api/v1/org-unit/reports/count:
    get:
      summary: Count reports
      operationId: count_reports
      tags:
      - Reports
      parameters:
      - $ref: '#/components/parameters/ReportsFilterBy'
      - $ref: '#/components/parameters/Search'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/reports/availability:
    get:
      summary: Reports availability
      operationId: are_reports_available
      tags:
      - Reports
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                - isAvailable
                properties:
                  isAvailable:
                    type: boolean
                    example: true
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /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:
      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'
  /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'
components:
  parameters:
    ReportsSortBy:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameters.
      schema:
        $ref: '#/components/schemas/ReportFilterAndSortFields'
    Search:
      name: search
      in: query
      required: false
      description: Filter results by a free text search.
      schema:
        type: string
        example: test project
    SortOrder:
      name: sortOrder
      in: query
      required: false
      description: Sort results in descending or ascending order.
      schema:
        type: string
        enum:
        - asc
        - desc
        default: asc
    ReportId:
      name: reportId
      in: path
      required: true
      description: The report id
      example: 575c19e8-c7c3-45b0-8290-2f47397a8383
      schema:
        type: string
        format: uuid
    ReportsFilterBy:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(name|createdAt|createdBy|status)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
        - name!=some-name
      explode: false
    Limit:
      name: limit
      in: query
      required: false
      description: The maximum number of entries to return.
      schema:
        type: integer
        format: int32
        default: 50
        minimum: 1
        maximum: 500
    Offset:
      name: offset
      in: query
      required: false
      description: The offset of the first item returned in the collection.
      schema:
        type: integer
        format: int32
        example: 100
  schemas:
    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
      example:
        code: 400
        message: Bad request - Resource should have a name
    CountResponse:
      type: object
      required:
      - count
      properties:
        count:
          type: integer
          format: int64
          example: 1
    Report:
      allOf:
      - $ref: '#/components/schemas/ReportRequestFields'
      - $ref: '#/components/schemas/ReportCalculatedFields'
    ReportFilterAndSortFields:
      type: string
      enum:
      - name
      - createdAt
      - createdBy
      - status
    ReportRequestFields:
      type: object
      required:
      - name
      - start
      - end
      properties:
        name:
          type: string
          example: 2023 GPU report
        description:
          type: string
          example: This report shows the GPU usage of all projects in the organization
        start:
          type: string
          format: date-time
          description: timestamp from when to fetch data in UTC
          example: '2023-06-07T09:09:18.211Z'
        end:
          type: string
          format: date-time
          description: timestamp until when to fetch data in UTC
          example: '2023-06-07T12:09:18.211Z'
        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)(==).+$
          example:
          - projectName==some-name
    Reports:
      type: array
      items:
        $ref: '#/components/schemas/Report'
    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
          example: user@run.ai
        tenantId:
          type: integer
          format: int32
          description: ID of the tenant where the project is located.
          example: 2
        status:
          $ref: '#/components/schemas/ReportStatus'
        statusUpdatedAt:
          type: string
          format: date-time
        statusMessage:
          type: string
          example: Report in queue
  responses:
    404NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 404
            message: Resource id not found.
    403Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 403
            message: You do not have sufficient permissions.
    204NoContent:
      description: No Content.
    503ServiceUnavailable:
      description: unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 503
            message: Please try again in few minutes.
    401Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 401
            message: Issuer is not familiar.
    400BadRequest:
      description: Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 400
            message: Required parameter is missing
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer authentication
x-tagGroups:
- name: Organizations
  tags:
  - Clusters
  - Departments
  - Reports
  - NodePools
  - Nodes
  - Projects
  - Tenant
  - Logo
  - Researcher Command Line Interface
  - Researcher Command Line Interface Deprecated
  - Administrator Command Line Interface
  - Network Topologies
- name: Authentication and Authorization
  tags:
  - Access Keys
  - Access rules
  - Permissions
  - Applications
  - Service Accounts
  - Roles
  - Tokens
  - Users
  - User Applications
  - Idps
  - Me
  - Settings
  - Org unit
- name: Audit
  tags:
  - AuditLogs
- name: Datavolumes
  tags:
  - Datavolumes
- name: Workloads
  tags:
  - Events
  - Pods
  - Workloads
  - Workloads V2
  - NVIDIA NIM
  - Workspaces
  - Trainings
  - Inferences
  - Revisions
  - Distributed
  - Workloads batch
  - Workload properties
  - Workload templates
  - Distributed Inferences
- name: Workload assets
  tags:
  - Compute
  - Credentials
  - Datasources
  - Environment
  - Storage Classes
  - Storage Class Configuration
  - Git
  - HostPath
  - NFS
  - PVC
  - Registry
  - S3
  - ConfigMap
  - Secret
  - Template
- name: Policies
  tags:
  - Policy
- name: Notifications
  tags:
  - Notification State
  - Notification Types
  - NotificationChannels
  - Subscriptions
- name: AI Applications
  tags:
  - AI Applications