Templates are a pre-set configuration used to quickly configure and submit workloads using existing assets.
Retrieve a list of templates.
Request completed successfully.
Unauthorized
Forbidden
unexpected error
{- "entries": [- {- "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": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "toolTypes": [- "jupyter-notebook"
 ]
 },
- "compute": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset"
 },
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": null,
- "key": null
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- null
 ],
- "authorizedGroups": [- null
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 },
- "distributed": {- "numWorkers": 0,
- "noMaster": true,
- "distFramework": "MPI",
- "master": {- "assets": {- "environment": {- "id": null,
- "name": null,
- "toolTypes": [ ]
 },
- "compute": {- "id": null,
- "name": null
 },
- "datasources": [- null
 ],
- "workloadVolumes": [- null
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- null
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": null,
- "key": null
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- null
 ],
- "labels": [- null
 ],
- "connections": [- null
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": null,
- "maxReplicas": null,
- "scaleToZeroRetentionSeconds": null,
- "thresholdMetric": null,
- "thresholdValue": null
 }
 }
 }
 }
 }
 }
 ]
}Use to create a template.
| required | object (AssetCreationRequest)  | 
| required | object (SpecificRunCreationFields)  The information needed for creating az template - a set of assets and an optional set of specific environment parameters. | 
Request accepted successfully.
Bad request.
Unauthorized
Forbidden
The specified resource already exists
unexpected error
{- "meta": {- "name": "my-asset",
- "scope": "tenant",
- "workloadSupportedTypes": {- "workspace": false,
- "training": false,
- "inference": false,
- "distributed": true,
- "distFramework": "TF"
 }
 },
- "spec": {- "assets": {- "environment": "fafd1151-c401-4fdd-ac01-03d8e7a57166",
- "compute": "a8d9e7bc-1f1b-4fab-ae09-ad78c0a843fe",
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": "postgress_secret",
- "key": "POSTGRES_PASSWORD"
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- "string"
 ],
- "authorizedGroups": [- "string"
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 }
 }
}{- "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": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "toolTypes": [- "jupyter-notebook"
 ]
 },
- "compute": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset"
 },
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": "postgress_secret",
- "key": "POSTGRES_PASSWORD"
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- "string"
 ],
- "authorizedGroups": [- "string"
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 },
- "distributed": {- "numWorkers": 0,
- "noMaster": true,
- "distFramework": "MPI",
- "master": {- "assets": {- "environment": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "toolTypes": [- "jupyter-notebook"
 ]
 },
- "compute": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset"
 },
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": null,
- "key": null
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- null
 ],
- "authorizedGroups": [- null
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 }
 }
 }
 }
}Retrieve the details of a template by id.
Request completed successfully.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
{- "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": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "toolTypes": [- "jupyter-notebook"
 ]
 },
- "compute": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset"
 },
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": "postgress_secret",
- "key": "POSTGRES_PASSWORD"
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- "string"
 ],
- "authorizedGroups": [- "string"
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 },
- "distributed": {- "numWorkers": 0,
- "noMaster": true,
- "distFramework": "MPI",
- "master": {- "assets": {- "environment": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "toolTypes": [- "jupyter-notebook"
 ]
 },
- "compute": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset"
 },
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": null,
- "key": null
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- null
 ],
- "authorizedGroups": [- null
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 }
 }
 }
 }
}Use to update the details of a template by id.
| required | object (AssetUpdateRequest)  | 
| required | object (SpecificRunCreationFields)  The information needed for creating az template - a set of assets and an optional set of specific environment parameters. | 
Request accepted successfully.
Bad request.
Unauthorized
Forbidden
The specified resource already exists
unexpected error
{- "meta": {- "name": "my-asset"
 },
- "spec": {- "assets": {- "environment": "fafd1151-c401-4fdd-ac01-03d8e7a57166",
- "compute": "a8d9e7bc-1f1b-4fab-ae09-ad78c0a843fe",
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": "postgress_secret",
- "key": "POSTGRES_PASSWORD"
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- "string"
 ],
- "authorizedGroups": [- "string"
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 }
 }
}{- "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": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "toolTypes": [- "jupyter-notebook"
 ]
 },
- "compute": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset"
 },
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": "postgress_secret",
- "key": "POSTGRES_PASSWORD"
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- "string"
 ],
- "authorizedGroups": [- "string"
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 },
- "distributed": {- "numWorkers": 0,
- "noMaster": true,
- "distFramework": "MPI",
- "master": {- "assets": {- "environment": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "toolTypes": [- "jupyter-notebook"
 ]
 },
- "compute": {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset"
 },
- "datasources": [- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "my-asset",
- "kind": "compute"
 }
 ],
- "workloadVolumes": [- "string"
 ]
 },
- "specificEnv": {- "command": "python",
- "args": "-x my-script.py",
- "runAsUid": 500,
- "runAsGid": 30,
- "supplementalGroups": "2,3,5,8",
- "environmentVariables": [- {- "name": "HOME",
- "value": "/home/my-folder",
- "secret": {- "name": null,
- "key": null
 },
- "exclude": false
 }
 ],
- "nodeType": "my-node-type",
- "nodePools": [- "my-node-pool-a",
- "my-node-pool-b"
 ],
- "podAffinity": {- "type": "Required",
- "key": "string"
 },
- "terminateAfterPreemption": false,
- "autoDeletionTimeAfterCompletionSeconds": 15,
- "backoffLimit": 3,
- "annotations": [- {- "name": "billing",
- "value": "my-billing-unit",
- "exclude": false
 }
 ],
- "labels": [- {- "name": "stage",
- "value": "initial-research",
- "exclude": false
 }
 ],
- "connections": [- {- "name": "string",
- "nodePort": 65535,
- "externalUrl": "string",
- "authorizedUsers": [- null
 ],
- "authorizedGroups": [- null
 ]
 }
 ],
- "allowOverQuota": true,
- "autoScaling": {- "minReplicas": 0,
- "maxReplicas": 1,
- "scaleToZeroRetentionSeconds": 3600,
- "thresholdMetric": "throughput",
- "thresholdValue": 0
 }
 }
 }
 }
 }
}Use to delete a template by id.
Accepted.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
{- "code": 202,
- "message": "Request has been accepted."
}