Departments
Departments, in the hierarchy of resource allocation, are above Projects. A Department can contain multiple Projects, and has its own quotas. A Department's quota supersedes the total of the Project quotas in the Department, so tt is recommended that a Department's quota be the total, or more than of all the Project quotas in the Department. For further information see, Working with Departments.
list departments
Bearer authentication
Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
["name!=some-name"]Sort results by a parameters.
Departments verbosity. If it is set to "verbose", status will be returned. If it is not defined or set to "brief" only unit specific data will be returned.
verbosePossible values: Sort results in descending or ascending order.
ascPossible values: The offset of the first item returned in the collection.
100The maximum number of entries to return.
50ok
1Bad request.
Unauthorized
Forbidden
unexpected error
GET /api/v1/org-unit/departments HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"departments": [
{
"description": "text",
"schedulingRules": {
"interactiveJobTimeLimitSeconds": 100,
"interactiveJobMaxIdleDurationSeconds": 100,
"interactiveJobPreemptIdleDurationSeconds": 100,
"trainingJobMaxIdleDurationSeconds": 100,
"trainingJobTimeLimitSeconds": 100
},
"defaultNodePools": [
"text"
],
"nodeTypes": {
"training": [
"text"
],
"workspace": [
"text"
],
"names": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"name": "organization1",
"clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
"overtimeData": {
"range24hData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range7dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range30dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
}
}
},
{
"id": 50,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"createdBy": "text",
"updatedBy": "text",
"children": [
{
"id": "9f55253e-11ed-47c7-acef-fc4054768dbc",
"name": "organization1",
"children": [
"[Circular Reference]"
]
}
],
"status": {
"quotaStatus": {
"allocated": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"allocatedNonPreemptible": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"requested": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
}
}
},
"totalResources": {
"gpuQuota": 1,
"cpuQuota": 1,
"memoryQuota": 1
},
"resources": []
}
],
"next": 1
}Create Department
Bearer authentication
Updatable fields
department's description
default order of node pools for workloads. will be enforced if no list is defined in workload policy
organization1The id of the cluster.
71f69d83-ba66-4822-adf5-55ce55efd210Created
Updatable fields
department's description
default order of node pools for workloads. will be enforced if no list is defined in workload policy
organization1The id of the cluster.
71f69d83-ba66-4822-adf5-55ce55efd21050Bad request.
Unauthorized
Forbidden
The specified resource already exists
unexpected error
POST /api/v1/org-unit/departments HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 888
{
"description": "text",
"schedulingRules": {
"interactiveJobTimeLimitSeconds": 100,
"interactiveJobMaxIdleDurationSeconds": 100,
"interactiveJobPreemptIdleDurationSeconds": 100,
"trainingJobMaxIdleDurationSeconds": 100,
"trainingJobTimeLimitSeconds": 100
},
"defaultNodePools": [
"text"
],
"nodeTypes": {
"training": [
"text"
],
"workspace": [
"text"
],
"names": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"name": "organization1",
"clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
"overtimeData": {
"range24hData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range7dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range30dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
}
},
"resources": []
}{
"description": "text",
"schedulingRules": {
"interactiveJobTimeLimitSeconds": 100,
"interactiveJobMaxIdleDurationSeconds": 100,
"interactiveJobPreemptIdleDurationSeconds": 100,
"trainingJobMaxIdleDurationSeconds": 100,
"trainingJobTimeLimitSeconds": 100
},
"defaultNodePools": [
"text"
],
"nodeTypes": {
"training": [
"text"
],
"workspace": [
"text"
],
"names": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"name": "organization1",
"clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
"overtimeData": {
"range24hData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range7dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range30dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
}
},
"id": 50,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"createdBy": "text",
"updatedBy": "text",
"children": [
{
"id": "9f55253e-11ed-47c7-acef-fc4054768dbc",
"name": "organization1",
"children": [
{
"id": "9f55253e-11ed-47c7-acef-fc4054768dbc",
"name": "organization1",
"children": "[Circular Reference]"
}
]
}
],
"projectsAggregatedResources": [
{
"nodePool": {
"id": 22,
"name": "default"
},
"gpu": {
"deserved": 1000
},
"cpu": {
"deserved": 1000
},
"memory": {
"deserved": 1000,
"units": "Mib"
}
}
],
"status": {
"nodePoolQuotaStatuses": [
{
"allocated": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"allocatedNonPreemptible": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"requested": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"nodePoolName": "text",
"nodePoolId": "text"
}
],
"quotaStatus": {
"allocated": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"allocatedNonPreemptible": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"requested": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
}
}
},
"totalResources": {
"gpuQuota": 1,
"cpuQuota": 1,
"memoryQuota": 1
},
"resources": []
}Get department by Id
Bearer authentication
The id of the department.
1ok
Updatable fields
department's description
default order of node pools for workloads. will be enforced if no list is defined in workload policy
organization1The id of the cluster.
71f69d83-ba66-4822-adf5-55ce55efd21050Unauthorized
Forbidden
The specified resource was not found
unexpected error
GET /api/v1/org-unit/departments/{departmentId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"description": "text",
"schedulingRules": {
"interactiveJobTimeLimitSeconds": 100,
"interactiveJobMaxIdleDurationSeconds": 100,
"interactiveJobPreemptIdleDurationSeconds": 100,
"trainingJobMaxIdleDurationSeconds": 100,
"trainingJobTimeLimitSeconds": 100
},
"defaultNodePools": [
"text"
],
"nodeTypes": {
"training": [
"text"
],
"workspace": [
"text"
],
"names": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"name": "organization1",
"clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
"overtimeData": {
"range24hData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range7dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range30dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
}
},
"id": 50,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"createdBy": "text",
"updatedBy": "text",
"children": [
{
"id": "9f55253e-11ed-47c7-acef-fc4054768dbc",
"name": "organization1",
"children": [
{
"id": "9f55253e-11ed-47c7-acef-fc4054768dbc",
"name": "organization1",
"children": "[Circular Reference]"
}
]
}
],
"projectsAggregatedResources": [
{
"nodePool": {
"id": 22,
"name": "default"
},
"gpu": {
"deserved": 1000
},
"cpu": {
"deserved": 1000
},
"memory": {
"deserved": 1000,
"units": "Mib"
}
}
],
"status": {
"nodePoolQuotaStatuses": [
{
"allocated": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"allocatedNonPreemptible": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"requested": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"nodePoolName": "text",
"nodePoolId": "text"
}
],
"quotaStatus": {
"allocated": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"allocatedNonPreemptible": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"requested": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
}
}
},
"totalResources": {
"gpuQuota": 1,
"cpuQuota": 1,
"memoryQuota": 1
},
"resources": []
}Update department by Id
Bearer authentication
The id of the department.
1Updatable fields
department's description
default order of node pools for workloads. will be enforced if no list is defined in workload policy
Updated
Updatable fields
department's description
default order of node pools for workloads. will be enforced if no list is defined in workload policy
organization1The id of the cluster.
71f69d83-ba66-4822-adf5-55ce55efd21050Bad request.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
PUT /api/v1/org-unit/departments/{departmentId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 384
{
"description": "text",
"schedulingRules": {
"interactiveJobTimeLimitSeconds": 100,
"interactiveJobMaxIdleDurationSeconds": 100,
"interactiveJobPreemptIdleDurationSeconds": 100,
"trainingJobMaxIdleDurationSeconds": 100,
"trainingJobTimeLimitSeconds": 100
},
"defaultNodePools": [
"text"
],
"nodeTypes": {
"training": [
"text"
],
"workspace": [
"text"
],
"names": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"resources": []
}{
"description": "text",
"schedulingRules": {
"interactiveJobTimeLimitSeconds": 100,
"interactiveJobMaxIdleDurationSeconds": 100,
"interactiveJobPreemptIdleDurationSeconds": 100,
"trainingJobMaxIdleDurationSeconds": 100,
"trainingJobTimeLimitSeconds": 100
},
"defaultNodePools": [
"text"
],
"nodeTypes": {
"training": [
"text"
],
"workspace": [
"text"
],
"names": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"name": "organization1",
"clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
"overtimeData": {
"range24hData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range7dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
},
"range30dData": {
"averageGpuAllocation": 10,
"averageGpuUtilization": 95,
"averageGpuMemoryUtilization": 95,
"updatedAt": "2021-08-01T00:00:00Z"
}
},
"id": 50,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"createdBy": "text",
"updatedBy": "text",
"children": [
{
"id": "9f55253e-11ed-47c7-acef-fc4054768dbc",
"name": "organization1",
"children": [
{
"id": "9f55253e-11ed-47c7-acef-fc4054768dbc",
"name": "organization1",
"children": "[Circular Reference]"
}
]
}
],
"projectsAggregatedResources": [
{
"nodePool": {
"id": 22,
"name": "default"
},
"gpu": {
"deserved": 1000
},
"cpu": {
"deserved": 1000
},
"memory": {
"deserved": 1000,
"units": "Mib"
}
}
],
"status": {
"nodePoolQuotaStatuses": [
{
"allocated": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"allocatedNonPreemptible": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"requested": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"nodePoolName": "text",
"nodePoolId": "text"
}
],
"quotaStatus": {
"allocated": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"allocatedNonPreemptible": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
},
"requested": {
"gpu": 0,
"cpu": 1000,
"memory": 1000
}
}
},
"totalResources": {
"gpuQuota": 1,
"cpuQuota": 1,
"memoryQuota": 1
},
"resources": []
}Delete department by Id
Bearer authentication
The id of the department.
1Deleted
No content
Bad request.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
DELETE /api/v1/org-unit/departments/{departmentId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Update department resources by Id
Bearer authentication
The id of the department.
1Resources assigned to this Project per Node Pool
NormalUpdated
NormalBad request.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
PUT /api/v1/org-unit/departments/{departmentId}/resources HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2
[][]Partial updates to specific items in the list. Should be used for update one or more attributes of an item without modifying the entire resource.
Bearer authentication
The id of the department.
1Resources assigned to this Project per Node Pool
NormalUpdated
NormalBad request.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
PATCH /api/v1/org-unit/departments/{departmentId}/resources HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2
[][]Retrieves department data metrics from the metrics database. Use in reporting and analysis tools.
Bearer authentication
The id of the department.
1Start date of time range to fetch data in ISO 8601 timestamp format.
2023-06-06T12:09:18.211ZEnd date of time range to fetch data in ISO 8601 timestamp format.
2023-06-07T12:09:18.211ZThe number of samples to take in the specified time range.
20Example: 20Filter using the nodepool.
defaultExecuted successfully.
Partial success.
Bad request.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
GET /api/v1/org-unit/departments/{departmentId}/metrics?metricType=GPU_QUOTA&start=2023-06-06T12%3A09%3A18.211Z&end=2023-06-07T12%3A09%3A18.211Z HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"measurements": [
{
"type": "ALLOCATED_GPU",
"labels": "{'gpu': '3'}",
"values": [
{
"value": "85",
"timestamp": "2023-06-06 12:09:18.211"
}
]
}
]
}Bearer authentication
Filter using the Universally Unique Identifier (UUID) of the cluster.
d73a738f-fab3-430a-8fa3-5241493d7128Filter using the nodepool.
defaultFilter using the department id.
1Select a telemetry type.
Executed successfully.
specifies what data returned
ALLOCATION_RATIO2023-06-06 12:09:18.211Bad request.
Unauthorized
Forbidden
unexpected error
GET /api/v1/org-unit/departments/telemetry?telemetryType=GPU_QUOTA HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"type": "ALLOCATION_RATIO",
"timestamp": "2023-06-06 12:09:18.211",
"values": [
{
"value": "85",
"groups": [
{
"key": "department",
"value": "1",
"name": "department-A"
}
]
}
]
}count departments
Bearer authentication
Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
["name!=some-name"]ok
1Bad request.
Unauthorized
Forbidden
unexpected error
GET /api/v1/org-unit/departments/count HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1
}Get metrics for all departments in the cluster. Use a time range to return historical data (optional). If you use a start date, an end date is required.
Bearer authentication
The Universally Unique Identifier (UUID) of the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcStart of time range to fetch data from in UTC format.
2023-06-06 12:09:18.211End of time range to fetch data from in UTC format.
2023-06-07 12:09:18.211The number of samples to take in the specified time range.
20Example: 20Filter by unique nodepool name.
defaultSuccessfully retrieved metrics for all departments.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
GET /v1/k8s/clusters/{clusterUuid}/departments/metrics HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"metadata": {
"departmentId": 8,
"departmentName": "default",
"clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
"clusterName": "cluster-a"
},
"current": {
"resources": [
{
"numberOfPendingWorkloads": 1,
"gpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"cpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"memory": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"nodepoolName": "nodepoola"
}
],
"projectResources": [
{
"numberOfPendingWorkloads": 1,
"gpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"cpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"memory": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"projectName": "project-a",
"nodepoolName": "nodepoola"
}
]
},
"timeRange": null
}
],
"timeRange": {
"resources": [
{
"numberOfPendingWorkloads": 1,
"gpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"cpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"memory": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"timestamp": "2023-06-06T12:09:18.211Z"
}
]
}
}Get metrics for a specific department in the cluster. Use a time range to return historical data (optional). If you use a start date, an end date is required.
Bearer authentication
The Universally Unique Identifier (UUID) of the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcThe id of the department.
1Start of time range to fetch data from in UTC format.
2023-06-06 12:09:18.211End of time range to fetch data from in UTC format.
2023-06-07 12:09:18.211The number of samples to take in the specified time range.
20Example: 20Filter by unique nodepool name.
defaultSuccessfully retrieved metrics for the department.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
GET /v1/k8s/clusters/{clusterUuid}/departments/{departmentId}/metrics HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"metadata": {
"departmentId": 8,
"departmentName": "default",
"clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
"clusterName": "cluster-a"
},
"current": {
"resources": [
{
"numberOfPendingWorkloads": 1,
"gpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"cpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"memory": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"nodepoolName": "nodepoola"
}
],
"projectResources": [
{
"numberOfPendingWorkloads": 1,
"gpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"cpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"memory": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"projectName": "project-a",
"nodepoolName": "nodepoola"
}
]
},
"timeRange": {
"resources": [
{
"numberOfPendingWorkloads": 1,
"gpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"cpu": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"memory": {
"quota": 3,
"allocated": 2.5,
"utilization": 0.765
},
"timestamp": "2023-06-06T12:09:18.211Z"
}
]
}
}Retrieves the details of a specific department. Requires theview permission for the department.
Bearer authentication
The Universally Unique Identifier (UUID) of the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcThe unique id of the department.
2backwards compatibility of the 'departmentAdmins' field. if 'true', will not set the 'departmentAdmins' field in the returned department. if 'false', will set the 'departmentAdmins' field in the returned department.
trueSuccessfully retrieved department details.
GET /v1/k8s/clusters/{clusterId}/departments/{department-id} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successfully retrieved department details.
{
"nodePoolsResources": [
{
"id": 1
},
{
"nodePool": {
"id": 3,
"name": "default"
},
"gpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"cpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"memory": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
}
}
],
"tenantId": 42,
"clusterUuid": "UUID",
"createdAt": "2021-12-14T16:04:15.099Z",
"id": 2,
"projects": [
{
"id": 16,
"name": "team-a",
"deserved_gpus": 3
}
],
"departmentAdmins": [
"text"
],
"name": "default"
}Updates a department's details in the cluster. \n For example, node pools and other details.
Bearer authentication
The unique uuid identifying the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcThe unique id identifying the department.
2Department updated successfully.
PUT /v1/k8s/clusters/{clusterId}/departments/{department-id} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 269
{
"nodePoolsResources": [
{
"id": 1
},
{
"nodePool": {
"id": 3,
"name": "default"
},
"gpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"cpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"memory": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
}
}
],
"name": "default"
}Department updated successfully.
{
"nodePoolsResources": [
{
"id": 1
},
{
"nodePool": {
"id": 3,
"name": "default"
},
"gpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"cpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"memory": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
}
}
],
"tenantId": 42,
"clusterUuid": "UUID",
"createdAt": "2021-12-14T16:04:15.099Z",
"id": 2,
"projects": [
{
"id": 16,
"name": "team-a",
"deserved_gpus": 3
}
],
"departmentAdmins": [
"text"
],
"name": "default"
}Deletes a department from a specific cluster.
Bearer authentication
The unique uuid identifying the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcThe unique id identifying the department.
2Department deleted successfully.
DELETE /v1/k8s/clusters/{clusterId}/departments/{department-id} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Department deleted successfully.
{
"nodePoolsResources": [
{
"id": 1
},
{
"nodePool": {
"id": 3,
"name": "default"
},
"gpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"cpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"memory": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
}
}
],
"tenantId": 42,
"clusterUuid": "UUID",
"createdAt": "2021-12-14T16:04:15.099Z",
"id": 2,
"projects": [
{
"id": 16,
"name": "team-a",
"deserved_gpus": 3
}
],
"departmentAdmins": [
"text"
],
"name": "default"
}List all the departments managed by the tenant on a specific cluster.
Bearer authentication
The Universally Unique Identifier (UUID) of the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcBackward compatibility of the departmentAdmins field. If true, the departmentAdmins field in the returned departments is not set. If false, the departmentAdmins is set in the returned departments.
trueMemory returned in MB. When set to false (default) memory will be returned in MiB.
trueSuccessfully retrieved a list of Departments.
GET /v1/k8s/clusters/{clusterId}/departments HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successfully retrieved a list of Departments.
[
{
"nodePoolsResources": [
{
"id": 1
},
{
"nodePool": {
"id": 3,
"name": "default"
},
"gpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"cpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"memory": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
}
}
],
"tenantId": 42,
"clusterUuid": "UUID",
"createdAt": "2021-12-14T16:04:15.099Z",
"id": 2,
"projects": [
{
"id": 16,
"name": "team-a",
"deserved_gpus": 3
}
],
"departmentAdmins": [
"text"
]
},
{
"name": "default"
}
]Creates a new department in the cluster.
Bearer authentication
The unique uuid identifying the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcDepartment created successfully.
POST /v1/k8s/clusters/{clusterId}/departments HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 42
{
"nodePoolsResources": [],
"name": "default"
}Department created successfully.
{
"nodePoolsResources": [
{
"id": 1
},
{
"nodePool": {
"id": 3,
"name": "default"
},
"gpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"cpu": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
},
"memory": {
"deserved": 0,
"maxAllowed": 1000,
"overQuotaWeight": 2
}
}
],
"tenantId": 42,
"clusterUuid": "UUID",
"createdAt": "2021-12-14T16:04:15.099Z",
"id": 2,
"projects": [
{
"id": 16,
"name": "team-a",
"deserved_gpus": 3
}
],
"departmentAdmins": [
"text"
],
"name": "default"
}Deprecated. Instead, use the accessrules API to add the department-admin permissions to a specific subject.
Bearer authentication
The unique uuid identifying the cluster.
9f55255e-11ed-47c7-acef-fc4054768dbcThe unique id identifying the department.
2The unique id identifying the department.
2Id's of users with department admin role that are assigned to managed the department
Department admin set successfully.
The unique id identifying the department.
2Id's of users with department admin role that are assigned to managed the department
Bad request.
Unauthenticated
Forbidden
PUT /v1/k8s/clusters/{clusterId}/departments/{department-id}/access-control HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 46
{
"departmentId": 2,
"departmentAdmins": [
"text"
]
}{
"departmentId": 2,
"departmentAdmins": [
"text"
]
}Last updated