> This page is for Self-Hosted, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/self-hosted/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/self-hosted/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/self-hosted/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/self-hosted/v2.24/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/run-ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/run-ai/_mcp/server.

# Get a template.

GET http://localhost:8080/api/v1/asset/workload-template/{AssetId}

Retrieve the details of a template by id.

Reference: https://docs.nvidia.com/run-ai/self-hosted/reference/rest-api/endpoints/workload-assets/template/get-template-by-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Request

### Path parameters

- `AssetId` (string, required) — Unique identifier of the asset.

## Response

### 200

Request completed successfully.

- `meta` (AssetMeta, required)
- `spec` (SpecificRunInfoFields, required) — Information about the set of assets which comprises a workspace, training or template, and an optional set of specific run parameters.

## Errors

### 401 Unauthorized Error

Unauthorized

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 403 Forbidden Error

Forbidden

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 404 Not Found Error

The specified resource was not found

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 503 Service Unavailable Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

## Types

### AssetMeta

- `name` (string, required) — The name of the asset.
- `scope` (enum, required) — The scope in which an asset can be used. The highest scope, system, is intended for internal purposes only.
  - Allowed values: `system`, `tenant`, `cluster`, `department`, `project`
- `id` (string, required) — Unique identifier of the asset.
- `kind` (enum, required) — The kind of the asset.
  - Allowed values: `compute`, `environment`, `accessKey`, `dockerRegistry`, `password`, `genericSecret`, `registry`, `s3`, `git`, `nfs`, `pvc`, `hostPath`, `workload-template`, `model`, `config-map`, `secret-volume`, `data-volume`, `ngcApiKey`
- `createdBy` (string, required) — The user who created the asset.
- `createdAt` (datetime, required) — The time at which the asset were created
- `updatedBy` (string, required) — The user who updated the asset.
- `updatedAt` (datetime, required) — The time at which the asset has been updated
- `description` (string, optional) — The description of the asset.
- `clusterId` (string, optional) — The id of the cluster.
- `departmentId` (string, optional, nullable) — The id of the department. Must be specified for department scoped assets.
- `projectId` (integer, optional, nullable) — The id of the project. Must be specified for project scoped assets.
- `autoDelete` (boolean, optional, nullable, default: false) — The asset will be deleted automatically. This is intended for internal use.
- `workloadSupportedTypes` (WorkloadSupportedTypes, optional)
- `private` (boolean, optional, nullable, default: false) — The asset will be private to the user who created it. supported only for docker registry and generic secrets
- `tenantId` (integer, optional, nullable) — The id of the tenant.
- `deletedAt` (datetime, optional) — Deletion time of the asset (relevant for assets that sync to the cluster)
- `deletedBy` (string, optional) — The user who deleted the asset
- `projectName` (string, optional, nullable) — The name of the project that the asset is associated with, for project scoped assets.
- `updateCount` (long, optional) — the value of an update counter of a data in the system.

### SpecificRunInfoFields

Information about the set of assets which comprises a workspace, training or template, and an optional set of specific run parameters.

- `assets` (AssetsRef, required) — Reference information about a set of assets. used to describe - assets comprising a workspace - assets comprising a workspace template - assets that use other assets (e.g. s3 asset which uses access key).
- `specificEnv` (SpecificRunParams, optional) — Parameters which apply to a specific workload. They complement the information gathered from the assets comprising the workload.
- `distributed` (InfoDistributed, optional) — Parameters which apply to distributed training.

### WorkloadSupportedTypes

- `inference` (boolean, optional, nullable) — Is inference a supported workload type.
- `workspace` (boolean, optional, nullable) — Is workspace a supported workload type.
- `training` (boolean, optional, nullable) — Is training a supported workload type.
- `distributed` (boolean, optional, nullable) — Is distributed a supported workload type.
- `distFramework` (enum, optional, nullable) — The distributed training framework used in the workload. Note: The TF, XGBoost and JAX frameworks are deprecated and will be removed in a future release.
  - Allowed values: `MPI`, `PyTorch`, `TF`, `XGBoost`, `JAX`

### AssetsRef

Reference information about a set of assets. used to describe - assets comprising a workspace - assets comprising a workspace template - assets that use other assets (e.g. s3 asset which uses access key).

- `environment` (EnvironmentAssetRef, required) — environment asset.
- `compute` (AssetsRefCompute, optional)
- `datasources` (list of DatasourceRef, optional)
- `workloadVolumes` (list of string, optional)

### SpecificRunParams

Parameters which apply to a specific workload. They complement the information gathered from the assets comprising the workload.

- `allowOverQuota` (boolean, optional, nullable) — Whether to allow the workload to exceed the quota of the project.
- `annotations` (list of Annotation, optional) — Set of annotations to populate into the container running the workload.
- `args` (string, optional) — Arguments to the command that the container running the workload executes.
- `autoDeletionTimeAfterCompletionSeconds` (long, optional) — Specifies the duration after which a finished workload (completed or failed) will be automatically deleted. The default is 30 days. Log retention is managed separately.
- `autoScaling` (SpecificRunAutoScalingAutoScaling, optional, nullable)
- `backoffLimit` (long, optional) — Specifies the number of retries before marking a workload as failed (not applicable to Inference workloads). The default value is 6.
- `category` (string, optional) — Specify the workload category assigned to the workload. Categories are used to classify and monitor different types of workloads within the NVIDIA Run:ai platform.
- `command` (string, optional) — A command to the server as the entry point of the container running the workload.
- `completions` (integer, optional) — Used with Hyperparameter Optimization. Specifies the number of successful pods the job should reach to be completed. The Job will be marked as successful once the specified amount of pods has been reached (applicable to standard training only).
- `connections` (list of SpecificRunConnectionInfo, optional, nullable)
- `environmentVariables` (list of EnvironmentVariableOfAsset, optional) — Set of environment variables to populate into the container running the workspace.
- `imagePullSecrets` (list of ImagePullSecret, optional) — A list of references to Kubernetes secrets in the same namespace used for pulling container images.
- `labels` (list of Label, optional) — Set of labels to populate into the container running the workload.
- `nodeAffinityRequired` (NodeAffinityRequired, optional) — If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
- `nodePools` (list of string, optional) — A prioritized list of node pools for the scheduler to run the workload on. The scheduler will always try to use the first node pool before moving to the next one if the first is not available.
- `nodeType` (string, optional) — Deprecated: use a workload policy node selector to target node types instead. Nodes (machines), or a group of nodes on which the workload will run. To use this feature, your Administrator will need to label nodes. For more information, see [Group Nodes](https://docs.run.ai/latest/admin/researcher-setup/limit-to-node-group). When using this flag with with Project-based affinity, it refines the list of allowable node groups set in the Project. For more information, see [Projects](https://docshub.run.ai/guides/platform-management/aiinitiatives/organization/projects).
- `parallelism` (integer, optional) — Used with Hyperparameter Optimization. Specifies the maximum number of pods the workload should run at any given time (applicable to standard training only).
- `podAffinity` (PodAffinity, optional) — Pod affinity scheduling rules (e.g. co-locate this workload in the same node, zone, etc. as some other workloads).
- `preemptibility` (enum, optional) — Specifies whether the workload can be preempted by higher-priority workloads. Valid values are preemptible, semi-preemptible and non-preemptible. If explicitly set, this value takes precedence. If not set, the system derives the preemptibility from the priorityClassName field, ensuring backward compatibility. Each workload type has a default preemptibility. To view the default preemptibility for each workload type, use the GET /workload-types endpoint.
  - Allowed values: `preemptible`, `semi-preemptible`, `non-preemptible`
- `priorityClass` (string, optional) — Specifies the priority class for the workload, which determines its scheduling behavior. Valid values are: very-low, low, medium-low, medium, medium-high, high, and very-high. Each workload type has a default priority. To view the default priority for each workload type, use the GET /workload-types endpoint. Once you change the priority from the default value defined for that workload type, the preemptibility field is not automatically updated. Make sure to set the desired preemptibility value.
- `restartPolicy` (enum, optional) — Specify the restart policy of the workload pods. Default is empty, which is determine by the framework default. The `Always` value is deprecated; use `OnFailure` or `Never` instead.
  - Allowed values: `Always`, `Never`, `OnFailure`
- `runAsGid` (long, optional) — The group id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsGid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
- `runAsUid` (long, optional) — 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.
- `servingPortAccess` (ServingPortAccess, optional, nullable)
- `supplementalGroups` (string, optional) — 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.
- `terminateAfterPreemption` (boolean, optional) — Indicates if the job should be terminated by the system after it has been preempted.
- `terminationGracePeriodSeconds` (long, optional) — Duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down).
- `tolerations` (list of Toleration, optional) — Set of tolerations to apply to the workload.

### InfoDistributed

Parameters which apply to distributed training.

- `numWorkers` (integer, optional)
- `noMaster` (boolean, optional, nullable)
- `distFramework` (enum, optional) — The distributed training framework used in the workload. Note: The TF, XGBoost and JAX frameworks are deprecated and will be removed in a future release.
  - Allowed values: `MPI`, `PyTorch`, `TF`, `XGBoost`, `JAX`
- `master` (InfoDistMaster, optional) — Parameters which apply to the master in a distributed training.

### EnvironmentAssetRef

Reference information about environment asset.

- `id` (string, required) — Unique identifier of the asset.
- `name` (string, required) — The name of the asset.
- `toolTypes` (list of enum, optional, nullable) — the type of tools as defined in the connections of the environment asset.
  - Allowed values: `jupyter-notebook`, `pycharm`, `visual-studio-code`, `tensorboard`, `rstudio`, `mlflow`, `custom`, `wandb`, `matlab`, `comet`, `chatbot-ui`

### AssetsRefCompute

- `id` (string, required) — Unique identifier of the asset.
- `name` (string, required) — The name of the asset.

### DatasourceRef

Reference information about a datasource asset.

- `id` (string, required) — Unique identifier of the asset.
- `name` (string, required) — The name of the asset.
- `kind` (enum, required) — The kind of the asset.
  - Allowed values: `compute`, `environment`, `accessKey`, `dockerRegistry`, `password`, `genericSecret`, `registry`, `s3`, `git`, `nfs`, `pvc`, `hostPath`, `workload-template`, `model`, `config-map`, `secret-volume`, `data-volume`, `ngcApiKey`
- `overrides` (DataSourceOverrides, optional) — specific fields to override in the data source.

### Annotation

Annotation details to be populated into the container.

- `name` (string, optional, nullable) — The name of the annotation (mandatory)
- `value` (string, optional, nullable) — The value of the annotation.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the annotation is defined in defaults of the policy, and you wish to exclude it from the workload.

### SpecificRunAutoScalingAutoScaling

- `activationReplicas` (integer, optional, nullable) — The number of replicas to run when scaling-up from zero. Defaults to minReplicas, or to 1 if minReplicas is set to 0
- `concurrencyHardLimit` (integer, optional, nullable) — The maximum number of requests allowed to flow to a single replica at any time. 0 means no limit
- `initialReplicas` (integer, optional, nullable) — The number of replicas to run when initializing the workload for the first time. Defaults to minReplicas, or to 1 if minReplicas is set to 0
- `maxReplicas` (integer, optional, nullable) — The maximum number of replicas for autoscaling. Defaults to minReplicas, or to 1 if minReplicas is set to 0
- `metricThresholdPercentage` (float, optional, nullable) — The percentage of metric threshold value to use for autoscaling. Defaults to 70. Applicable only with the 'throughput' and 'concurrency' metrics
- `minReplicas` (integer, optional, nullable) — The minimum number of replicas for autoscaling. Defaults to 1. Use 0 to allow scale-to-zero
- `scaleDownDelaySeconds` (integer, optional, nullable) — The minimum amount of time (in seconds) that a replica will remain active after a scale-down decision
- `scaleToZeroRetentionSeconds` (integer, optional, nullable) — The minimum amount of time (in seconds) that the last replica will remain active after a scale-to-zero decision. Defaults to 0. Available only if minReplicas is set to 0
- `thresholdMetric` (string, optional) — The metric to use for autoscaling. Mandatory if minReplicas \< maxReplicas, except for the special case where minReplicas is set to 0 and maxReplicas is set to 1, as in this case autoscaling decisions are made according to network activity rather than metrics. Use one of the built-in metrics of 'throughput', 'concurrency' or 'latency', or any other available custom metric. Only the 'throughput' and 'concurrency' metrics support scale-to-zero
- `thresholdValue` (integer, optional, nullable) — The threshold value to use with the specified metric for autoscaling
- `initializationTimeoutSeconds` (integer, optional, nullable, deprecated) — Use `servingConfiguration.initializationTimeoutSeconds` instead. If this field is set, it will be ignored and the value under `servingConfiguration` will be used. The maximum amount of time (in seconds) to wait for the container to become ready.

### SpecificRunConnectionInfo

- `name` (string, optional) — Unique identifier of the connection. Will be used to correlate between the information given here and the information provided for the connection in the environment asset.
- `nodePort` (integer, optional, nullable) — Port number of the host that will be connected with the container port. Required if and only if isCustomPort is set to true in the environment asset.
- `externalUrl` (string, optional, nullable) — URL to associated with the container port. Required if and only if isCustomExternalUrl is set to true in the environment asset.
- `authorizedUsers` (list of string, optional, nullable) — List of users or applications that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
- `authorizedGroups` (list of string, optional, nullable) — Specifies the names of those groups that are allowed to access the connection. Note that authorizedUsers and authorizedGroups are mutually exclusive.

### EnvironmentVariableOfAsset

Details of an environment variable which is populated into the container.

- `name` (string, optional, nullable) — The name of the environment variable. (mandatory)
- `value` (string, optional, nullable) — The value of the environment variable. (mutually exclusive with credential, configMap and podFieldRef)
- `credential` (EnvironmentVariableCredential, optional) — Details of the secret and key use to populate the environment variable. (mutually exclusive with value)
- `configMap` (EnvironmentVariableConfigMap, optional) — Details of the configMap and key use to populate the environment variable
- `podFieldRef` (EnvironmentVariablePodFieldReference, optional) — Details of the field-reference and key use to populate the environment variable
- `exclude` (boolean, optional, nullable) — Use 'true' in case the environment variable is defined in defaults of the policy, and you wish to exclude it from the workload.
- `description` (string, optional, nullable) — Description of the environment variable.

### ImagePullSecret

A reference to a secret in the same namespace used to pull container images.

- `name` (string, optional) — The name of the Kubernetes secret containing the image pull credentials.
- `userCredential` (boolean, optional, nullable) — Indicates whether the secret is a user credential. Set to true if the secret was created by the user and is only accessible by them.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the secret is defined in defaults of the policy, and you wish to exclude it from the workload.

### Label

Label details to be populated into the container.

- `name` (string, optional, nullable) — The name of the label (mandatory)
- `value` (string, optional, nullable) — The value of the label.
- `exclude` (boolean, optional, nullable) — Use 'true' in case the label is defined in defaults of the policy, and you wish to exclude it from the workload.

### NodeAffinityRequired

If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.

- `nodeSelectorTerms` (list of NodeSelectorTerm, optional) — A list of node selector terms. The terms are ORed.

### PodAffinity

Pod affinity scheduling rules (e.g. co-locate this workload in the same node, zone, etc. as some other workloads).

- `type` (enum, optional) — The affinity type, required or preferred. (mandatory)
  - Allowed values: `Required`, `Preferred`
- `key` (string, optional, nullable) — The label key to use. (mandatory)

### ServingPortAccess

- `authorizationType` (enum, optional) — Specifies who can send inference requests to the serving endpoint: Possible values: - `public`: No authorization is required. (Default) - `authenticatedUsers`: Any NVIDIA Run:ai authenticated user and service account can send requests. - `authorizedUsers`: Only users listed in the authorizedUsers field can send requests. - `authorizedGroups`: Only members of user groups listed in the authorizedGroups field can send requests. - `authorizedUsersOrGroups`: Requires either authorizedUsers or authorizedGroups to be provided; if neither is set, or if both are set, a mutual exclusion error is reported. Supported from cluster version 2.19.
  - Allowed values: `public`, `authenticatedUsers`, `authorizedUsers`, `authorizedGroups`, `authorizedUsersOrGroups`
- `authorizedUsers` (list of string, optional) — List of users or service accounts that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
- `authorizedGroups` (list of string, optional) — List of groups that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
- `clusterLocalAccessOnly` (boolean, optional, nullable) — Configure the serving port URL to be available only on the cluster-local network, and not externally. Defaults to false

### Toleration

Toleration details.

- `name` (string, optional, nullable) — The name of the toleration.
- `operator` (enum, optional) — A key's relationship to the value. Equal uses key and value. Exists is equivalent to wildcard for value, so that a workload can tolerate all taints of a particular category. (mandatory)
  - Allowed values: `Equal`, `Exists`
- `key` (string, optional, nullable) — The taint key that the toleration applies to. (mandatory)
- `value` (string, optional, nullable) — The taint value the toleration matches to. Mandatory if operator is Exists, forbidden otherwise.
- `effect` (enum, optional) — The taint effect to match. (mandatory)
  - Allowed values: `NoSchedule`, `NoExecute`, `PreferNoSchedule`, `Any`
- `seconds` (integer, optional, nullable) — The period of time the toleration tolerates the taint. Valid only if effect is NoExecute. taint.
- `exclude` (boolean, optional, nullable) — Use 'true' in case the label is defined in defaults of the policy, and you wish to exclude it from the workload.

### InfoDistMaster

Parameters which apply to the master in a distributed training.

- `assets` (AssetsRefOptional, optional)
- `specificEnv` (SpecificRunParams, optional) — Parameters which apply to a specific workload. They complement the information gathered from the assets comprising the workload.

### DataSourceOverrides

specific fields to override in the data source.

- `containerPath` (string, optional, nullable)

### EnvironmentVariableCredential

Details of the secret and key use to populate the environment variable. (mutually exclusive with value)

- `assetId` (string, optional, nullable) — Unique identifier of the asset. (mandatory)
- `key` (string, optional, nullable) — The key in the secret resource. (mandatory)

### EnvironmentVariableConfigMap

Details of the configMap and key use to populate the environment variable

- `name` (string, optional, nullable) — The name of the config-map resource. (mandatory)
- `key` (string, optional, nullable) — The key in the config-map resource. (mandatory)

### EnvironmentVariablePodFieldReference

Details of the field-reference and key use to populate the environment variable

- `path` (string, optional, nullable) — The field path resource. (mandatory)

### NodeSelectorTerm

A null or empty node selector term matches no objects. The requirements of them are ANDed.

- `matchExpressions` (list of MatchExpression, optional) — A list of node selector requirements by node's labels.

### AssetsRefOptional

- `environment` (EnvironmentAssetRef, required) — environment asset.
- `compute` (AssetsRefCompute, optional)
- `datasources` (list of DatasourceRef, optional)
- `workloadVolumes` (list of string, optional)

### MatchExpression

A selector that contains values, a key, and an operator that relates the key and values.

- `key` (string, required) — The label key that the selector applies to (mandatory).
- `operator` (enum, required) — Represents a key's relationship to a set of values (mandatory).
  - Allowed values: `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, `Lt`
- `values` (list of string, optional) — An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer.

## Examples

**Response**

```json
{
  "meta": {
    "name": "my-asset",
    "scope": "tenant",
    "id": "a418ed33-9399-48c0-a890-122cadd13bfd",
    "kind": "s3",
    "createdBy": "test@run.ai",
    "createdAt": "2023-02-23T14:25:36.707685Z",
    "updatedBy": "test@run.ai",
    "updatedAt": "2023-02-23T14:25:36.707685Z",
    "workloadSupportedTypes": {
      "workspace": false,
      "training": false,
      "distributed": true,
      "distFramework": "TF"
    }
  },
  "spec": {
    "assets": {
      "environment": {
        "id": "string",
        "name": "my-asset",
        "toolTypes": [
          "jupyter-notebook"
        ]
      },
      "compute": {
        "id": "string",
        "name": "my-asset"
      },
      "datasources": [
        {
          "id": "string",
          "name": "my-asset",
          "kind": "compute",
          "overrides": {
            "containerPath": "/container/directory"
          }
        }
      ],
      "workloadVolumes": [
        "string"
      ]
    },
    "specificEnv": {
      "allowOverQuota": true,
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "autoScaling": {
        "activationReplicas": 1,
        "concurrencyHardLimit": 1,
        "initialReplicas": 1,
        "maxReplicas": 1,
        "metricThresholdPercentage": 1.1,
        "minReplicas": 1,
        "scaleDownDelaySeconds": 1,
        "scaleToZeroRetentionSeconds": 1,
        "thresholdMetric": "http_requests_total",
        "thresholdValue": 1,
        "initializationTimeoutSeconds": 1
      },
      "backoffLimit": 3,
      "category": "string",
      "command": "python",
      "completions": 1,
      "connections": [
        {
          "name": "string",
          "nodePort": 1,
          "externalUrl": "string",
          "authorizedUsers": [
            "string"
          ],
          "authorizedGroups": [
            "string"
          ]
        }
      ],
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "credential": {
            "assetId": "string",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "imagePullSecrets": [
        {
          "name": "string",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "string",
                "operator": "In",
                "values": [
                  "string"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "parallelism": 1,
      "podAffinity": {
        "type": "Required",
        "key": "string"
      },
      "preemptibility": "preemptible",
      "priorityClass": "string",
      "restartPolicy": "Always",
      "runAsGid": 30,
      "runAsUid": 500,
      "servingPortAccess": {
        "authorizationType": "public",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "clusterLocalAccessOnly": true
      },
      "supplementalGroups": "2,3,5,8",
      "terminateAfterPreemption": false,
      "terminationGracePeriodSeconds": 20,
      "tolerations": [
        {
          "name": "string",
          "operator": "Equal",
          "key": "string",
          "value": "string",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ]
    },
    "distributed": {
      "numWorkers": 1,
      "noMaster": true,
      "distFramework": "MPI",
      "master": {
        "assets": {
          "environment": {
            "id": "string",
            "name": "my-asset",
            "toolTypes": [
              "jupyter-notebook"
            ]
          },
          "compute": {
            "id": "string",
            "name": "my-asset"
          },
          "datasources": [
            {
              "id": "string",
              "name": "my-asset",
              "kind": "compute",
              "overrides": {
                "containerPath": "/container/directory"
              }
            }
          ],
          "workloadVolumes": [
            "string"
          ]
        },
        "specificEnv": {
          "allowOverQuota": true,
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "autoDeletionTimeAfterCompletionSeconds": 15,
          "autoScaling": {
            "activationReplicas": 1,
            "concurrencyHardLimit": 1,
            "initialReplicas": 1,
            "maxReplicas": 1,
            "metricThresholdPercentage": 1.1,
            "minReplicas": 1,
            "scaleDownDelaySeconds": 1,
            "scaleToZeroRetentionSeconds": 1,
            "thresholdMetric": "http_requests_total",
            "thresholdValue": 1,
            "initializationTimeoutSeconds": 1
          },
          "backoffLimit": 3,
          "category": "string",
          "command": "python",
          "completions": 1,
          "connections": [
            {
              "name": "string",
              "nodePort": 1,
              "externalUrl": "string",
              "authorizedUsers": [
                "string"
              ],
              "authorizedGroups": [
                "string"
              ]
            }
          ],
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "credential": {
                "assetId": "string",
                "key": "POSTGRES_PASSWORD"
              },
              "configMap": {
                "name": "my-config-map",
                "key": "MY_POSTGRES_SCHEMA"
              },
              "podFieldRef": {
                "path": "metadata.name"
              },
              "exclude": false,
              "description": "Home directory of the user."
            }
          ],
          "imagePullSecrets": [
            {
              "name": "string",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "string",
                    "operator": "In",
                    "values": [
                      "string"
                    ]
                  }
                ]
              }
            ]
          },
          "nodePools": [
            "my-node-pool-a",
            "my-node-pool-b"
          ],
          "nodeType": "my-node-type",
          "parallelism": 1,
          "podAffinity": {
            "type": "Required",
            "key": "string"
          },
          "preemptibility": "preemptible",
          "priorityClass": "string",
          "restartPolicy": "Always",
          "runAsGid": 30,
          "runAsUid": 500,
          "servingPortAccess": {
            "authorizationType": "public",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "clusterLocalAccessOnly": true
          },
          "supplementalGroups": "2,3,5,8",
          "terminateAfterPreemption": false,
          "terminationGracePeriodSeconds": 20,
          "tolerations": [
            {
              "name": "string",
              "operator": "Equal",
              "key": "string",
              "value": "string",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ]
        }
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/api/v1/asset/workload-template/AssetId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/api/v1/asset/workload-template/AssetId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/asset/workload-template/AssetId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/asset/workload-template/AssetId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/asset/workload-template/AssetId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/asset/workload-template/AssetId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/asset/workload-template/AssetId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/asset/workload-template/AssetId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```