NVIDIA Run:ai Subscriptions API

Use to manage notifications subscriptions.

OpenAPI Specification

runai-subscriptions-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 Subscriptions 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: Subscriptions
  description: Use to manage notifications subscriptions.
paths:
  /api/v1/subscriptions:
    get:
      tags:
      - Subscriptions
      operationId: getMySubscriptions
      summary: Get current users subscriptions
      description: Get current users subscriptions
      responses:
        '200':
          description: A Subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscriptions'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '501':
          $ref: '#/components/responses/501NotImplemented'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      tags:
      - Subscriptions
      operationId: createSubscription
      summary: Create user subscription
      description: Create user subscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subscription'
      responses:
        '200':
          description: Subscription created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '501':
          $ref: '#/components/responses/501NotImplemented'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/subscriptions/{id}:
    parameters:
    - $ref: '#/components/parameters/SubscriptionId'
    put:
      tags:
      - Subscriptions
      operationId: updateSubscription
      summary: Update user subscription
      description: Update user subscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionForPut'
      responses:
        '200':
          description: Subscription created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '501':
          $ref: '#/components/responses/501NotImplemented'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      tags:
      - Subscriptions
      operationId: deleteSubscription
      summary: Delete user subscription
      description: Delete user subscription
      responses:
        '204':
          description: Subscription deleted successfully
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '501':
          $ref: '#/components/responses/501NotImplemented'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
components:
  responses:
    401Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 401
            message: Issuer is not familiar.
    404NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 404
            message: Resource id not found.
    500InternalServerError:
      description: unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 500
            message: Something went wrong.
    501NotImplemented:
      description: unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 501
            message: Not implemented
    400BadRequest:
      description: Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 400
            message: Required parameter is missing
    503ServiceUnavailable:
      description: unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 503
            message: Please try again in few minutes.
    403Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 403
            message: You do not have sufficient permissions.
  schemas:
    Subscriptions:
      type: array
      items:
        $ref: '#/components/schemas/Subscription'
    SubscriptionEvent:
      type: object
      required:
      - category
      - types
      properties:
        category:
          type: string
        types:
          type: array
          items:
            type: string
    Subscription:
      type: object
      required:
      - events
      - channels
      allOf:
      - $ref: '#/components/schemas/SubscriptionForPut'
      - type: object
        properties:
          id:
            type: string
      example:
        id: 1234
        events:
        - category: cat1
          types:
          - type1
          - type2
        - category: cat2
          types:
          - type3
          - type4
        channels:
        - email
        - email1
    SubscriptionEvents:
      type: array
      items:
        $ref: '#/components/schemas/SubscriptionEvent'
    SubscriptionForPut:
      type: object
      required:
      - events
      - channels
      properties:
        events:
          $ref: '#/components/schemas/SubscriptionEvents'
        channels:
          type: array
          items:
            type: string
      example:
        events:
        - category: cat1
          types:
          - type1
          - type2
        - category: cat2
          types:
          - type3
          - type4
        channels:
        - email
        - email1
    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
  parameters:
    SubscriptionId:
      name: id
      in: path
      description: Subscription id
      required: true
      schema:
        type: string
  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