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

Filter results by scope.

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 both project, department, cluster and tenant assets.

departmentIdstringOptional

Filter using the department id.

Example: 1
clusterIdstring · uuidOptional

Filter using the Universally Unique Identifier (UUID) of the cluster.

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.

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: 1226

{
  "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": {
      "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": "text"
      },
      "terminateAfterPreemption": false,
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "connections": [],
      "allowOverQuota": true,
      "autoScaling": {
        "minReplicas": 1,
        "maxReplicas": 1,
        "scaleToZeroRetentionSeconds": 1,
        "thresholdMetric": "throughput",
        "thresholdValue": 1
      }
    }
  }
}
{
  "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": {
      "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": "text"
      },
      "terminateAfterPreemption": false,
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "connections": [],
      "allowOverQuota": true,
      "autoScaling": {
        "minReplicas": 1,
        "maxReplicas": 1,
        "scaleToZeroRetentionSeconds": 1,
        "thresholdMetric": "throughput",
        "thresholdValue": 1
      }
    },
    "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": {
          "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": "text"
          },
          "terminateAfterPreemption": false,
          "autoDeletionTimeAfterCompletionSeconds": 15,
          "backoffLimit": 3,
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "connections": [],
          "allowOverQuota": true,
          "autoScaling": {
            "minReplicas": 1,
            "maxReplicas": 1,
            "scaleToZeroRetentionSeconds": 1,
            "thresholdMetric": "throughput",
            "thresholdValue": 1
          }
        }
      }
    }
  }
}
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": {
      "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": "text"
      },
      "terminateAfterPreemption": false,
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "connections": [],
      "allowOverQuota": true,
      "autoScaling": {
        "minReplicas": 1,
        "maxReplicas": 1,
        "scaleToZeroRetentionSeconds": 1,
        "thresholdMetric": "throughput",
        "thresholdValue": 1
      }
    },
    "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": {
          "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": "text"
          },
          "terminateAfterPreemption": false,
          "autoDeletionTimeAfterCompletionSeconds": 15,
          "backoffLimit": 3,
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "connections": [],
          "allowOverQuota": true,
          "autoScaling": {
            "minReplicas": 1,
            "maxReplicas": 1,
            "scaleToZeroRetentionSeconds": 1,
            "thresholdMetric": "throughput",
            "thresholdValue": 1
          }
        }
      }
    }
  }
}
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: 1089

{
  "meta": {
    "name": "my-asset"
  },
  "spec": {
    "assets": {
      "environment": "123e4567-e89b-12d3-a456-426614174000",
      "compute": "text",
      "datasources": [],
      "workloadVolumes": [
        "text"
      ]
    },
    "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": "text"
      },
      "terminateAfterPreemption": false,
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "connections": [],
      "allowOverQuota": true,
      "autoScaling": {
        "minReplicas": 1,
        "maxReplicas": 1,
        "scaleToZeroRetentionSeconds": 1,
        "thresholdMetric": "throughput",
        "thresholdValue": 1
      }
    }
  }
}
{
  "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": {
      "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": "text"
      },
      "terminateAfterPreemption": false,
      "autoDeletionTimeAfterCompletionSeconds": 15,
      "backoffLimit": 3,
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "connections": [],
      "allowOverQuota": true,
      "autoScaling": {
        "minReplicas": 1,
        "maxReplicas": 1,
        "scaleToZeroRetentionSeconds": 1,
        "thresholdMetric": "throughput",
        "thresholdValue": 1
      }
    },
    "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": {
          "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": "text"
          },
          "terminateAfterPreemption": false,
          "autoDeletionTimeAfterCompletionSeconds": 15,
          "backoffLimit": 3,
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "connections": [],
          "allowOverQuota": true,
          "autoScaling": {
            "minReplicas": 1,
            "maxReplicas": 1,
            "scaleToZeroRetentionSeconds": 1,
            "thresholdMetric": "throughput",
            "thresholdValue": 1
          }
        }
      }
    }
  }
}
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