For the complete documentation index, see llms.txt. This page is also available as Markdown.

Template

Templates are a pre-set configuration used to quickly configure and submit workloads using existing assets.

Deprecated

List templates.

get

Retrieve a list of templates.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
namestringOptional

Filter results by name.

scopestringOptional

Filters results by scope. Returns only assets that belong to the specified scope. Mutually exclusive with includeDescendants. Valid values: tenant, cluster, department, project.

projectIdinteger · int32Optional

Filter results by project id. If scope filter is project, only assets from the specific project will be included in the response. Otherwise, the response will include project, department, cluster, tenant and system assets.

departmentIdstringOptional

Filter results by department id. If scope filter is department, only assets from the specific department will be included in the response. Otherwise, the response will include department, cluster, tenant and system assets.

Example: 1
clusterIdstring · uuidOptional

Filter results by Universally Unique Identifier (UUID) of the cluster. If scope filter is cluster, only assets from the specific cluster will be included in the response. Otherwise, the response will include cluster, tenant and system assets.

Example: d73a738f-fab3-430a-8fa3-5241493d7128
distributedFrameworkstringOptional

Filter results to workload of type distributed and distributedFramework.

isDistributedbooleanOptional

Filter results to workload of type distributed.

isTrainingbooleanOptional

Filter results to workload of type training.

isWorkspacebooleanOptional

Filter results to workload of type workspace.

isDistributedInferencebooleanOptional

Filter results to workload of type distributed inference.

Responses
200

Request completed successfully.

application/json
get/api/v1/asset/workload-template
GET /api/v1/asset/workload-template HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "entries": []
}
Deprecated

Create a template.

post

Use to create a template.

Authorizations
AuthorizationstringRequired

Bearer authentication

Body
Responses
202

Request accepted successfully.

application/json
post/api/v1/asset/workload-template
POST /api/v1/asset/workload-template HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2025

{
  "meta": {
    "name": "my-asset",
    "scope": "tenant",
    "workloadSupportedTypes": {
      "workspace": false,
      "training": false,
      "inference": false,
      "distributed": true,
      "distFramework": "TF"
    }
  },
  "spec": {
    "assets": {
      "environment": "123e4567-e89b-12d3-a456-426614174000",
      "compute": "text",
      "datasources": [],
      "workloadVolumes": [
        "text"
      ]
    },
    "specificEnv": {
      "connections": [],
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "category": "text",
      "command": "python",
      "completions": 1,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "credential": {
            "assetId": "123e4567-e89b-12d3-a456-426614174000",
            "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": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "parallelism": 1,
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "preemptibility": "preemptible",
      "priorityClass": "text",
      "restartPolicy": "Always",
      "runAsGid": 30,
      "runAsUid": 500,
      "supplementalGroups": "2,3,5,8",
      "terminateAfterPreemption": false,
      "terminationGracePeriodSeconds": 20,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "allowOverQuota": true,
      "autoScaling": {
        "metricThresholdPercentage": 1,
        "minReplicas": 1,
        "maxReplicas": 1,
        "initialReplicas": 1,
        "activationReplicas": 1,
        "concurrencyHardLimit": 1,
        "scaleToZeroRetentionSeconds": 1,
        "scaleDownDelaySeconds": 1,
        "thresholdMetric": "http_requests_total",
        "thresholdValue": 1
      },
      "servingPortAccess": {
        "authorizationType": "public",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "clusterLocalAccessOnly": true
      }
    }
  }
}
{
  "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": "123e4567-e89b-12d3-a456-426614174000",
        "name": "my-asset",
        "toolTypes": [
          "jupyter-notebook"
        ]
      },
      "compute": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "my-asset"
      },
      "datasources": [],
      "workloadVolumes": [
        "text"
      ]
    },
    "specificEnv": {
      "connections": [],
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "category": "text",
      "command": "python",
      "completions": 1,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "credential": {
            "assetId": "123e4567-e89b-12d3-a456-426614174000",
            "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": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "parallelism": 1,
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "preemptibility": "preemptible",
      "priorityClass": "text",
      "restartPolicy": "Always",
      "runAsGid": 30,
      "runAsUid": 500,
      "supplementalGroups": "2,3,5,8",
      "terminateAfterPreemption": false,
      "terminationGracePeriodSeconds": 20,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "allowOverQuota": true,
      "autoScaling": {
        "metricThresholdPercentage": 1,
        "minReplicas": 1,
        "maxReplicas": 1,
        "initialReplicas": 1,
        "activationReplicas": 1,
        "concurrencyHardLimit": 1,
        "scaleToZeroRetentionSeconds": 1,
        "scaleDownDelaySeconds": 1,
        "thresholdMetric": "http_requests_total",
        "thresholdValue": 1
      },
      "servingPortAccess": {
        "authorizationType": "public",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "clusterLocalAccessOnly": true
      }
    },
    "distributed": {
      "numWorkers": 1,
      "noMaster": true,
      "distFramework": "MPI",
      "master": {
        "assets": {
          "environment": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "my-asset",
            "toolTypes": [
              "jupyter-notebook"
            ]
          },
          "compute": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "my-asset"
          },
          "datasources": [],
          "workloadVolumes": [
            "text"
          ]
        },
        "specificEnv": {
          "connections": [],
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "autoDeletionTimeAfterCompletionSeconds": 15,
          "backoffLimit": 3,
          "category": "text",
          "command": "python",
          "completions": 1,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "credential": {
                "assetId": "123e4567-e89b-12d3-a456-426614174000",
                "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": "text",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodePools": [
            "my-node-pool-a",
            "my-node-pool-b"
          ],
          "parallelism": 1,
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "preemptibility": "preemptible",
          "priorityClass": "text",
          "restartPolicy": "Always",
          "runAsGid": 30,
          "runAsUid": 500,
          "supplementalGroups": "2,3,5,8",
          "terminateAfterPreemption": false,
          "terminationGracePeriodSeconds": 20,
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "allowOverQuota": true,
          "autoScaling": {
            "metricThresholdPercentage": 1,
            "minReplicas": 1,
            "maxReplicas": 1,
            "initialReplicas": 1,
            "activationReplicas": 1,
            "concurrencyHardLimit": 1,
            "scaleToZeroRetentionSeconds": 1,
            "scaleDownDelaySeconds": 1,
            "thresholdMetric": "http_requests_total",
            "thresholdValue": 1
          },
          "servingPortAccess": {
            "authorizationType": "public",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "clusterLocalAccessOnly": true
          }
        }
      }
    }
  }
}
Deprecated

Get a template.

get

Retrieve the details of a template by id.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
AssetIdstring · uuid · min: 1Required

Unique identifier of the asset.

Responses
200

Request completed successfully.

application/json
get/api/v1/asset/workload-template/{AssetId}
GET /api/v1/asset/workload-template/{AssetId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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": "123e4567-e89b-12d3-a456-426614174000",
        "name": "my-asset",
        "toolTypes": [
          "jupyter-notebook"
        ]
      },
      "compute": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "my-asset"
      },
      "datasources": [],
      "workloadVolumes": [
        "text"
      ]
    },
    "specificEnv": {
      "connections": [],
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "category": "text",
      "command": "python",
      "completions": 1,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "credential": {
            "assetId": "123e4567-e89b-12d3-a456-426614174000",
            "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": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "parallelism": 1,
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "preemptibility": "preemptible",
      "priorityClass": "text",
      "restartPolicy": "Always",
      "runAsGid": 30,
      "runAsUid": 500,
      "supplementalGroups": "2,3,5,8",
      "terminateAfterPreemption": false,
      "terminationGracePeriodSeconds": 20,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "allowOverQuota": true,
      "autoScaling": {
        "metricThresholdPercentage": 1,
        "minReplicas": 1,
        "maxReplicas": 1,
        "initialReplicas": 1,
        "activationReplicas": 1,
        "concurrencyHardLimit": 1,
        "scaleToZeroRetentionSeconds": 1,
        "scaleDownDelaySeconds": 1,
        "thresholdMetric": "http_requests_total",
        "thresholdValue": 1
      },
      "servingPortAccess": {
        "authorizationType": "public",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "clusterLocalAccessOnly": true
      }
    },
    "distributed": {
      "numWorkers": 1,
      "noMaster": true,
      "distFramework": "MPI",
      "master": {
        "assets": {
          "environment": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "my-asset",
            "toolTypes": [
              "jupyter-notebook"
            ]
          },
          "compute": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "my-asset"
          },
          "datasources": [],
          "workloadVolumes": [
            "text"
          ]
        },
        "specificEnv": {
          "connections": [],
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "autoDeletionTimeAfterCompletionSeconds": 15,
          "backoffLimit": 3,
          "category": "text",
          "command": "python",
          "completions": 1,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "credential": {
                "assetId": "123e4567-e89b-12d3-a456-426614174000",
                "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": "text",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodePools": [
            "my-node-pool-a",
            "my-node-pool-b"
          ],
          "parallelism": 1,
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "preemptibility": "preemptible",
          "priorityClass": "text",
          "restartPolicy": "Always",
          "runAsGid": 30,
          "runAsUid": 500,
          "supplementalGroups": "2,3,5,8",
          "terminateAfterPreemption": false,
          "terminationGracePeriodSeconds": 20,
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "allowOverQuota": true,
          "autoScaling": {
            "metricThresholdPercentage": 1,
            "minReplicas": 1,
            "maxReplicas": 1,
            "initialReplicas": 1,
            "activationReplicas": 1,
            "concurrencyHardLimit": 1,
            "scaleToZeroRetentionSeconds": 1,
            "scaleDownDelaySeconds": 1,
            "thresholdMetric": "http_requests_total",
            "thresholdValue": 1
          },
          "servingPortAccess": {
            "authorizationType": "public",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "clusterLocalAccessOnly": true
          }
        }
      }
    }
  }
}
Deprecated

Update a template.

put

Use to update the details of a template by id.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
AssetIdstring · uuid · min: 1Required

Unique identifier of the asset.

Body
Responses
202

Request accepted successfully.

application/json
put/api/v1/asset/workload-template/{AssetId}
PUT /api/v1/asset/workload-template/{AssetId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1888

{
  "meta": {
    "name": "my-asset"
  },
  "spec": {
    "assets": {
      "environment": "123e4567-e89b-12d3-a456-426614174000",
      "compute": "text",
      "datasources": [],
      "workloadVolumes": [
        "text"
      ]
    },
    "specificEnv": {
      "connections": [],
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "category": "text",
      "command": "python",
      "completions": 1,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "credential": {
            "assetId": "123e4567-e89b-12d3-a456-426614174000",
            "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": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "parallelism": 1,
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "preemptibility": "preemptible",
      "priorityClass": "text",
      "restartPolicy": "Always",
      "runAsGid": 30,
      "runAsUid": 500,
      "supplementalGroups": "2,3,5,8",
      "terminateAfterPreemption": false,
      "terminationGracePeriodSeconds": 20,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "allowOverQuota": true,
      "autoScaling": {
        "metricThresholdPercentage": 1,
        "minReplicas": 1,
        "maxReplicas": 1,
        "initialReplicas": 1,
        "activationReplicas": 1,
        "concurrencyHardLimit": 1,
        "scaleToZeroRetentionSeconds": 1,
        "scaleDownDelaySeconds": 1,
        "thresholdMetric": "http_requests_total",
        "thresholdValue": 1
      },
      "servingPortAccess": {
        "authorizationType": "public",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "clusterLocalAccessOnly": true
      }
    }
  }
}
{
  "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": "123e4567-e89b-12d3-a456-426614174000",
        "name": "my-asset",
        "toolTypes": [
          "jupyter-notebook"
        ]
      },
      "compute": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "my-asset"
      },
      "datasources": [],
      "workloadVolumes": [
        "text"
      ]
    },
    "specificEnv": {
      "connections": [],
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "category": "text",
      "command": "python",
      "completions": 1,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "credential": {
            "assetId": "123e4567-e89b-12d3-a456-426614174000",
            "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": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "parallelism": 1,
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "preemptibility": "preemptible",
      "priorityClass": "text",
      "restartPolicy": "Always",
      "runAsGid": 30,
      "runAsUid": 500,
      "supplementalGroups": "2,3,5,8",
      "terminateAfterPreemption": false,
      "terminationGracePeriodSeconds": 20,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "allowOverQuota": true,
      "autoScaling": {
        "metricThresholdPercentage": 1,
        "minReplicas": 1,
        "maxReplicas": 1,
        "initialReplicas": 1,
        "activationReplicas": 1,
        "concurrencyHardLimit": 1,
        "scaleToZeroRetentionSeconds": 1,
        "scaleDownDelaySeconds": 1,
        "thresholdMetric": "http_requests_total",
        "thresholdValue": 1
      },
      "servingPortAccess": {
        "authorizationType": "public",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "clusterLocalAccessOnly": true
      }
    },
    "distributed": {
      "numWorkers": 1,
      "noMaster": true,
      "distFramework": "MPI",
      "master": {
        "assets": {
          "environment": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "my-asset",
            "toolTypes": [
              "jupyter-notebook"
            ]
          },
          "compute": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "my-asset"
          },
          "datasources": [],
          "workloadVolumes": [
            "text"
          ]
        },
        "specificEnv": {
          "connections": [],
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "autoDeletionTimeAfterCompletionSeconds": 15,
          "backoffLimit": 3,
          "category": "text",
          "command": "python",
          "completions": 1,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "credential": {
                "assetId": "123e4567-e89b-12d3-a456-426614174000",
                "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": "text",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodePools": [
            "my-node-pool-a",
            "my-node-pool-b"
          ],
          "parallelism": 1,
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "preemptibility": "preemptible",
          "priorityClass": "text",
          "restartPolicy": "Always",
          "runAsGid": 30,
          "runAsUid": 500,
          "supplementalGroups": "2,3,5,8",
          "terminateAfterPreemption": false,
          "terminationGracePeriodSeconds": 20,
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "allowOverQuota": true,
          "autoScaling": {
            "metricThresholdPercentage": 1,
            "minReplicas": 1,
            "maxReplicas": 1,
            "initialReplicas": 1,
            "activationReplicas": 1,
            "concurrencyHardLimit": 1,
            "scaleToZeroRetentionSeconds": 1,
            "scaleDownDelaySeconds": 1,
            "thresholdMetric": "http_requests_total",
            "thresholdValue": 1
          },
          "servingPortAccess": {
            "authorizationType": "public",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "clusterLocalAccessOnly": true
          }
        }
      }
    }
  }
}
Deprecated

Delete a template.

delete

Use to delete a template by id.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
AssetIdstring · uuid · min: 1Required

Unique identifier of the asset.

Responses
202

Accepted.

application/json
codeinteger · min: 100 · max: 599Required
messagestringRequired
delete/api/v1/asset/workload-template/{AssetId}
DELETE /api/v1/asset/workload-template/{AssetId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "code": 202,
  "message": "Request has been accepted."
}

Last updated