NVIDIA Run:ai Environment API

An environment resource designates the container image, the image pull policy, working directory, security parameters, and others. It exposes all the necessary tools (open source, 3rd party, or custom tools) along with their connection interfaces including external node port and the container ports. You can also specify a standard, distributed, or inference workload architecture for the environment. An environment is a mandatory building block for the creation of a workload. For more information, see [Environments](https://run-ai-docs.nvidia.com/saas/workloads-in-nvidia-run-ai/assets/environments).

OpenAPI Specification

runai-environment-api-openapi.yml Raw ↑
openapi: 3.2.0
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 Environment 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: Environment
  description: "An environment resource designates the container image, the image pull policy, working directory, security parameters, and others. \nIt exposes all the necessary tools (open source, 3rd party, or custom tools) along \nwith their connection interfaces including external node port and the container ports.\nYou can also specify a standard, distributed, or inference workload architecture for the environment.\nAn environment is a mandatory building block for the creation of a workload.\nFor more information, see [Environments](https://run-ai-docs.nvidia.com/saas/workloads-in-nvidia-run-ai/assets/environments).\n"
paths:
  /api/v1/asset/environment:
    get:
      summary: List environment assets.
      description: Use to retrieve a list of environment assets.
      operationId: list_environment_assets
      tags:
      - Environment
      parameters:
      - $ref: '#/components/parameters/AssetNameFilter'
      - $ref: '#/components/parameters/AssetScopeFilter'
      - $ref: '#/components/parameters/AssetProjectFilter'
      - $ref: '#/components/parameters/AssetDepartmentFilter'
      - $ref: '#/components/parameters/AssetClusterFilter'
      - $ref: '#/components/parameters/IncludeUsageInfo'
      - $ref: '#/components/parameters/ComplyToProject'
      - $ref: '#/components/parameters/ComplyToWorkloadType'
      - $ref: '#/components/parameters/DistributedFrameworkQuery'
      - $ref: '#/components/parameters/IsDistributedQuery'
      - $ref: '#/components/parameters/IsTrainingQuery'
      - $ref: '#/components/parameters/IsWorkspaceQuery'
      - $ref: '#/components/parameters/IsInferenceQuery'
      - $ref: '#/components/parameters/ComplyToReplicaType'
      - $ref: '#/components/parameters/IncludeStatus'
      - $ref: '#/components/parameters/includeDescendants'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create an environment asset.
      description: Use to create an environment asset.
      operationId: create_environment_asset
      tags:
      - Environment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/environment/{AssetId}:
    parameters:
    - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get an environment asset.
      description: Use to retrieve the details of environment asset by id.
      operationId: get_environment_asset_by_id
      parameters:
      - $ref: '#/components/parameters/IncludeUsageInfo'
      - $ref: '#/components/parameters/ComplyToProject'
      - $ref: '#/components/parameters/ComplyToWorkloadType'
      - $ref: '#/components/parameters/ComplyToReplicaType'
      - $ref: '#/components/parameters/IncludeStatus'
      tags:
      - Environment
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update an environment asset.
      description: Use to update the details of environment asset by id.
      operationId: update_environment_asset_by_id
      tags:
      - Environment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an environment asset.
      description: Use to delete an environment asset by id.
      operationId: delete_environment_asset_by_id
      tags:
      - Environment
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
components:
  schemas:
    Capability:
      type: string
      enum:
      - AUDIT_CONTROL
      - AUDIT_READ
      - AUDIT_WRITE
      - BLOCK_SUSPEND
      - CHOWN
      - DAC_OVERRIDE
      - DAC_READ_SEARCH
      - FOWNER
      - FSETID
      - IPC_LOCK
      - IPC_OWNER
      - KILL
      - LEASE
      - LINUX_IMMUTABLE
      - MAC_ADMIN
      - MAC_OVERRIDE
      - MKNOD
      - NET_ADMIN
      - NET_BIND_SERVICE
      - NET_BROADCAST
      - NET_RAW
      - SETGID
      - SETFCAP
      - SETPCAP
      - SETUID
      - SYS_ADMIN
      - SYS_BOOT
      - SYS_CHROOT
      - SYS_MODULE
      - SYS_NICE
      - SYS_PACCT
      - SYS_PTRACE
      - SYS_RAWIO
      - SYS_RESOURCE
      - SYS_TIME
      - SYS_TTY_CONFIG
      - SYSLOG
      - WAKE_ALARM
    AssetsUsageRefCompute:
      allOf:
      - $ref: '#/components/schemas/AssetRef'
      type:
      - object
      - 'null'
    DataSourceOverrides:
      description: specific fields to override in the data source.
      type:
      - object
      - 'null'
      properties:
        containerPath:
          type:
          - string
          - 'null'
          minLength: 1
          example: /container/directory
    ExternalUrlInfo:
      properties:
        isCustomUrl:
          description: Whether external url is provided in the specific env of the workspace. Default is false, and in this case the external url is auto generated by the system.
          type: boolean
          default: false
        externalUrl:
          description: Default value for the external url. You can override it in the specific env of the workspace. Should be specified for ExternalUrl only.
          type:
          - string
          - 'null'
          minLength: 1
      type:
      - object
      - 'null'
    SupplementalGroups:
      description: Comma separated list of groups that the user running the container belongs to, in addition to the group indicated by runAsGid. Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled. Using an empty string implies reverting the supplementary groups of the image.
      type:
      - string
      - 'null'
      example: 2,3,5,8
      pattern: .*
    Connection:
      required:
      - name
      properties:
        name:
          description: A unique name of this connection. This name correlates between the connection information specified at the environment asset, to the information about the connection as specified in SpecificEnv for a specific workspace.
          type: string
          minLength: 1
        isExternal:
          description: Internal tools (isExternal=false) are tools that run as part of the container. External tools (isExternal=true) run outside the container, typically in the cloud.
          type: boolean
          default: false
        internalToolInfo:
          $ref: '#/components/schemas/InternalToolInfo'
        externalToolInfo:
          $ref: '#/components/schemas/ExternalToolInfo'
    UidGidSource:
      description: Indicate the way to determine the user and group ids of the container. The options are a. `fromTheImage` - user and group ids are determined by the docker image that the container runs. this is the default option. b. `custom` - user and group ids can be specified in the environment asset and/or the workload creation request. c. `idpToken` - user and group IDs are automatically taken from the identity provider (IdP) token (available only in SSO-enabled installations). For more information, see [User Identity](https://docs.run.ai/latest/admin/runai-setup/config/non-root-containers/).
      type:
      - string
      - 'null'
      enum:
      - fromTheImage
      - fromIdpToken
      - custom
    ImagePullPolicy:
      description: Image pull policy. Defaults to `Always` if `:latest` tag is specified, otherwise it is `IfNotPresent`.
      type:
      - string
      - 'null'
      minLength: 1
      enum:
      - Always
      - Never
      - IfNotPresent
    ExternalToolType:
      description: The type of external tool that is associated with the connection. External tool typically runs in the cloud and require external url for connecting to it.
      type: string
      minLength: 1
      enum:
      - wandb
      - comet
    ProbeHandler:
      description: The action taken to determine the health of the container. (mandatory)
      type:
      - object
      - 'null'
      properties:
        httpGet:
          description: An action based on HTTP Get requests.
          type: object
          properties:
            path:
              description: Path to access on the HTTP server, defaults to /.
              type:
              - string
              - 'null'
              pattern: ^(\x2F[a-zA-Z0-9\-_.\x2F]*)?$
              example: /
            port:
              description: Number of the port to access on the container.
              type:
              - integer
              - 'null'
              format: int32
              minimum: 1
              maximum: 65535
            host:
              description: Host name to connect to, defaults to the pod IP.
              type:
              - string
              - 'null'
              format: hostname
              example: example.com
              pattern: .*
            scheme:
              $ref: '#/components/schemas/ProbeHandlerScheme'
    EnvironmentVariablePodFieldReference:
      description: Details of the field-reference and key use to populate the environment variable
      properties:
        path:
          description: The field path resource. (mandatory)
          type:
          - string
          - 'null'
          minLength: 1
          example: metadata.name
          pattern: .*
      type:
      - object
      - 'null'
    AssetCreationRequest:
      allOf:
      - $ref: '#/components/schemas/AssetUpdatableFields'
      - $ref: '#/components/schemas/AssetCreationFields'
      example:
        name: my-asset
        scope: tenant
        workloadSupportedTypes:
          workspace: false
          training: false
          inference: false
          distributed: true
          distFramework: TF
    EnvironmentAsset:
      required:
      - meta
      - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/EnvironmentAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    HostNetwork:
      description: Whether to enable host networking. Default to false.
      type:
      - boolean
      - 'null'
      example: false
    EnvironmentListResponse:
      required:
      - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentAsset'
    Args:
      description: Arguments to the command that the container running the workload executes.
      type:
      - string
      - 'null'
      minLength: 1
      example: -x my-script.py
      pattern: .*
    SeccompProfileType:
      description: Indicates which kind of seccomp profile will be applied to the container. The options are a. `RuntimeDefault` - the container runtime default profile should be used. b. `Unconfined` - no profile should be applied. c. `Localhost` is not yet supported by Run:ai.
      type:
      - string
      - 'null'
      enum:
      - RuntimeDefault
      - Unconfined
      - Localhost
    ServingPortInfo:
      properties:
        protocol:
          type:
          - string
          - 'null'
          enum:
          - grpc
          - http
      type:
      - object
      - 'null'
    ToolType:
      description: Super set of Internal and External tool types.
      type: string
      minLength: 1
      enum:
      - jupyter-notebook
      - pycharm
      - visual-studio-code
      - tensorboard
      - rstudio
      - mlflow
      - custom
      - wandb
      - matlab
      - comet
      - chatbot-ui
    EnvironmentVariableCredential:
      description: Details of the secret and key use to populate the environment variable. (mutually exclusive with value)
      properties:
        assetId:
          description: Unique identifier of the asset. (mandatory)
          type:
          - string
          - 'null'
          minLength: 1
          format: uuid
        key:
          description: The key in the secret resource. (mandatory)
          type:
          - string
          - 'null'
          minLength: 1
          example: POSTGRES_PASSWORD
      type:
      - object
      - 'null'
    OverridableSpecFields:
      properties:
        args:
          $ref: '#/components/schemas/Args'
        command:
          $ref: '#/components/schemas/Command'
        environmentVariables:
          $ref: '#/components/schemas/EnvironmentVariablesOfAsset'
        runAsGid:
          $ref: '#/components/schemas/RunAsGid'
        runAsUid:
          $ref: '#/components/schemas/RunAsUid'
        supplementalGroups:
          $ref: '#/components/schemas/SupplementalGroups'
      type:
      - object
      - 'null'
    InternalToolType:
      description: The type of the internal tool. Internal tool runs within the container and exposes ports associated with the tool using NodePort, LoadBalancer or ExternalUrl.
      type: string
      minLength: 1
      enum:
      - jupyter-notebook
      - pycharm
      - visual-studio-code
      - tensorboard
      - rstudio
      - mlflow
      - custom
      - matlab
      - chatbot-ui
    ComplianceInfo:
      description: Compliance of an asset with creation of workloads in a given project.
      properties:
        imposed:
          description: Whether the asset is imposed on created workloads by the administrator.
          type: boolean
        compliance:
          description: Whether the asset info complies with creation of workloads in the project.
          type: boolean
        reason:
          description: For asset that does not comply, specify one or more reason why.
          type: array
          items:
            $ref: '#/components/schemas/ComplianceInfoReason'
      type:
      - object
      - 'null'
    AssetDatasourceRef:
      description: Reference information about a datasource asset.
      required:
      - id
      - name
      - kind
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
        kind:
          $ref: '#/components/schemas/AssetKind'
        overrides:
          $ref: '#/components/schemas/DataSourceOverrides'
          deprecated: true
    EnvironmentCreationRequest:
      required:
      - meta
      - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/EnvironmentAssetSpec'
    ScopeId:
      type: string
      description: The id of the cluster, department or project, depending on the scope type.
    NodePortInfo:
      properties:
        isCustomPort:
          description: Whether the node port is provided in the specific env of the workspace. Default is false, and in this case the node port is auto generated by the system.
          type: boolean
          default: false
      type:
      - object
      - 'null'
    ExternalToolInfo:
      description: Information of the external tool.
      required:
      - toolType
      - externalUrl
      properties:
        toolType:
          $ref: '#/components/schemas/ExternalToolType'
        externalUrl:
          description: The external url for connecting to the external tool. The url can include environment variables that will be replaced with the value provided for those variables when the workspace is created.
          example: https://wandb.com/myteam/${PROJECT_NAME}
          type: string
          minLength: 1
      type:
      - object
      - 'null'
    AllowPrivilegeEscalation:
      description: Allow the container running the workload and all launched processes to gain additional privileges after the workload starts. For more information consult the User Identity in Container guide at https://docs.run.ai/admin/runai-setup/config/non-root-containers/
      type:
      - boolean
      - 'null'
      example: false
    RunAsUid:
      description: The user id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsUid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
      type:
      - integer
      - 'null'
      format: int64
      example: 500
    ReadOnlyRootFileSystem:
      description: If true, mounts the container's root filesystem as read-only.
      type:
      - boolean
      - 'null'
      example: false
    AssetRef:
      description: Reference information about an asset.
      required:
      - id
      - name
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
    AssetUpdateRequest:
      allOf:
      - $ref: '#/components/schemas/AssetUpdatableFields'
      example:
        name: my-asset
    InternalConnectionType:
      description: The type of connection that exposes the container port.
      type: string
      minLength: 1
      enum:
      - LoadBalancer
      - NodePort
      - ExternalUrl
      - ServingPort
    ScopeType:
      type: string
      enum:
      - system
      - tenant
      - cluster
      - department
      - project
    Stdin:
      description: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF
      type:
      - boolean
      - 'null'
    EnvironmentVariableOfAsset:
      description: Details of an environment variable which is populated into the container.
      properties:
        name:
          description: The name of the environment variable. (mandatory)
          type:
          - string
          - 'null'
          minLength: 1
          example: HOME
        value:
          description: The value of the environment variable. (mutually exclusive with credential, configMap and podFieldRef)
          type:
          - string
          - 'null'
          example: /home/my-folder
        credential:
          $ref: '#/components/schemas/EnvironmentVariableCredential'
        configMap:
          $ref: '#/components/schemas/EnvironmentVariableConfigMap'
        podFieldRef:
          $ref: '#/components/schemas/EnvironmentVariablePodFieldReference'
        exclude:
          description: Use 'true' in case the environment variable is defined in defaults of the policy, and you wish to exclude it from the workload.
          type:
          - boolean
          - 'null'
          example: false
        description:
          description: Description of the environment variable.
          type:
          - string
          - 'null'
          example: Home directory of the user.
      type:
      - object
      - 'null'
    WorkingDir:
      description: Container's working directory. If not specified, the container runtime default will be used. This may be configured in the container image.
      type:
      - string
      - 'null'
      minLength: 1
      example: /home/myfolder
      pattern: .*
    WorkloadRefAndStatus:
      description: Id, name and status of a workspace or training
      required:
      - id
      - name
      properties:
        id:
          $ref: '#/components/schemas/WorkloadId1'
        name:
          $ref: '#/components/schemas/WorkloadName'
        status:
          description: The status of the workspace or training.
          type: string
          minLength: 1
    EnvironmentVariableConfigMap:
      description: Details of the configMap and key use to populate the environment variable
      properties:
        name:
          description: The name of the config-map resource. (mandatory)
          type:
          - string
          - 'null'
          minLength: 1
          example: my-config-map
          pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
        key:
          description: The key in the config-map resource. (mandatory)
          type:
          - string
          - 'null'
          minLength: 1
          example: MY_POSTGRES_SCHEMA
          pattern: .*
      type:
      - object
      - 'null'
    PolicyRuleEnum:
      description: Indicates which validation rule (e.g., min, max, step, options, required, canEdit, canAdd) conflicted with policy restrictions, causing the asset or template to be rejected.
      type:
      - string
      - 'null'
      enum:
      - min
      - max
      - step
      - options
      - required
      - canEdit
      - canAdd
      - locked
    AssetReadOnlyFields:
      required:
      - id
      - kind
      - createdBy
      - createdAt
      - updatedBy
      - updatedAt
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        kind:
          $ref: '#/components/schemas/AssetKind'
        tenantId:
          description: The id of the tenant.
          type:
          - integer
          - 'null'
          format: int32
        createdBy:
          description: The user who created the asset.
          type: string
          minLength: 1
        createdAt:
          description: The time at which the asset were created
          type: string
          minLength: 1
          format: date-time
        updatedBy:
          description: The user who updated the asset.
          type: string
          minLength: 1
        updatedAt:
          description: The time at which the asset has been updated
          type: string
          minLength: 1
          format: date-time
        deletedAt:
          description: Deletion time of the asset (relevant for assets that sync to the cluster)
          type: string
          minLength: 1
          format: date-time
        deletedBy:
          description: The user who deleted the asset
          type: string
          minLength: 1
        projectName:
          description: The name of the project that the asset is associated with, for project scoped assets.
          type:
          - string
          - 'null'
          minLength: 1
        updateCount:
          $ref: '#/components/schemas/UpdateCount'
      type: object
    ComplianceInfoReason:
      description: An issue preventing the use of a template or asset for creating workloads in a given project.
      required:
      - details
      properties:
        field:
          description: For policy related issues, includes a json path to the field in the policy for which the issue applies.
          type:
          - string
          - 'null'
          pattern: .*
        details:
          description: Explanation of the issue.
          type: string
          pattern: .*
        rule:
          $ref: '#/components/schemas/PolicyRuleEnum'
    Command:
      description: A command to the server as the entry point of the container running the workload.
      type:
      - string
      - 'null'
      minLength: 1
      example: python
      pattern: .*
    Image:
      description: Docker image name. For more information, see [Images](https://kubernetes.io/docs/concepts/containers/images). The image name is mandatory for creating a workload.
      type:
      - string
      - 'null'
      minLength: 1
      example: python:3.8
      pattern: .*
    Scope:
      description: The scope in which an asset can be used. The highest scope, system, is intended for internal purposes only.
      type: string
      minLength: 1
      enum:
      - system
      - tenant
      - cluster
      - department
      - project
    HttpResponse:
      required:
      - code
      - message
      properties:
        code:
          type: integer
          minimum: 100
          maximum: 599
        message:
          type: string
    UsageTimesInfo:
      description: Details about times the asset has been used by workloads, etc.
      properties:
        lastUsedByWorkload:
          description: The time at which the asset were last used by a workload of given type and project. This field requires complyToProject and complyToWorkload types flags of the API, to specify the workload type and project id.
          type:
          - string
          - 'null'
          minLength: 1
          format: date-time
      type:
      - object
      - 'null'
    InternalToolInfo:
      description: Information of the internal tool.
      required:
      - toolType
      - connectionType
      - containerPort
      properties:
        toolType:
          $ref: '#/components/schemas/InternalToolType'
        connectionType:
          $ref: '#/components/schemas/InternalConnectionType'
        containerPort:
          description: The port within the container that the connection exposes.
          type: integer
          format: int32
          minimum: 1
          maximum: 65535
        nodePortInfo:
          $ref: '#/components/schemas/NodePortInfo'
        externalUrlInfo:
          $ref: '#/components/schemas/ExternalUrlInfo'
        servingPortInfo:
          $ref: '#/components/schemas/ServingPortInfo'
      type:
      - object
      - 'null'
    ProbeHandlerScheme:
      description: Scheme to use for connecting to the host, defaults to HTTP.
      type:
      - string
      - 'null'
      enum:
      - HTTP
      - HTTPS
    AssetSyncStatusEnum:
      type: string
      enum:
      - Creating
      - Deleting
      - Failed
      - Deletion failed
      - Issues found
      - No issues found
      - No status
      - Updating
    AssetClusterStatusIssue:
      type: object
      required:
      - scopeId
      - scopeType
      - issue
      properties:
        scopeId:
          $ref: '#/components/schemas/ScopeId'
        scopeType:
          $ref: '#/components/schemas/ScopeType'
        issue:
          $ref: '#/components/schemas/AssetClusterStatusIssueEnum'
    AssetUpdatableFields:
      required:
      - name
      properties:
        name:
          $ref: '#/components/schemas/AssetName'
        description:
          $ref: '#/components/schemas/AssetDescription'
    Capabilities:
      description: Add POSIX capabilities to running containers. Defaults to the default set of capabilities granted by the container runtime.
      type:
      - array
      - 'null'
      items:
        $ref: '#/components/schemas/Capability'
      example:
      - CHOWN
      - KILL
    AssetsUsageRef:
      description: Reference information about usage of assets by other assets, for example datasources that uses credentials.
      properties:
        environment:
          type:
          - object
          - 'null'
          description: environment asset.
          allOf:
          - $ref: '#/components/schemas/EnvironmentAssetRef'
          deprecated: true
        environments:
          type: array
          items:
            $ref: '#/components/schemas/AssetRef'
        compute:
          $ref: '#/components/schemas/AssetsUsageRefCompute'
          deprecated: true
        computes:
          type: array
          items:
            $ref: '#/components/schemas/AssetRef'
        datasources:
          type: array
          items:
            $ref: '#/components/schemas/AssetDatasourceRef'
    AssetClusterStatusIssues:
      type: array
      items:
        $ref: '#/components/schemas/AssetClusterStatusIssue'
    EnvironmentAssetSpec:
      allOf:
      - $ref: '#/components/schemas/OverridableSpecFields'
      - $ref: '#/components/schemas/NonOverridableSpecFields'
    CreateHomeDir:
      description: When set to `true`, creates a home directory for the container.
      type:
      - boolean
      - 'null'
    EnvironmentVariablesOfAsset:
      description: Set of environment variables to populate into the container running the workspace.
      type:
      - array
      - 'null'
      items:
        $ref: '#/components/schemas/EnvironmentVariableOfAsset'
    AssetId:
      description: Unique identifier of the asset.
      type: string
      format: uuid
      minLength: 1
    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
    AssetKind:
      description: The kind of the asset.
      type: string
      minLength: 1
      enum:
      - compute
      - environment
      - accessKey
      - dockerRegistry
      - password
      - genericSecret
      - registry
      - s3
      - git
      - nfs
      - pvc
      - hostPath
      - workload-template
      - model
      - config-map
      - secret-volume
      - data-volume
      - ngcApiKey
    Probes:
      description: Probes a

# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/runai/refs/heads/main/openapi/runai-environment-api-openapi.yml