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
The description of the department.
An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.
The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).
organization1The id of the cluster.
71f69d83-ba66-4822-adf5-55ce55efd210Created
Updatable fields
The description of the department.
An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.
The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).
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.
1Pattern: .*ok
Updatable fields
The description of the department.
An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.
The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).
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.
1Pattern: .*Updatable fields
The description of the department.
An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.
Updated
Updatable fields
The description of the department.
An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.
The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).
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.
1Pattern: .*Deleted
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.
1Pattern: .*Resources assigned to this Project per Node Pool
The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank "High" will be scheduled before all workloads in rank "Medium".
MediumLowExample: HighDeprecated. Use rank instead. The scheduling priority for workloads in this node pool.
NormalUpdated
The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank "High" will be scheduled before all workloads in rank "Medium".
MediumLowExample: HighDeprecated. Use rank instead. The scheduling priority for workloads in this node pool.
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.
1Pattern: .*Resources assigned to this Project per Node Pool
The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank "High" will be scheduled before all workloads in rank "Medium".
MediumLowExample: HighDeprecated. Use rank instead. The scheduling priority for workloads in this node pool.
NormalUpdated
The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank "High" will be scheduled before all workloads in rank "Medium".
MediumLowExample: HighDeprecated. Use rank instead. The scheduling priority for workloads in this node pool.
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.
1Pattern: .*Start 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
}List departments node pool resources
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 >=.
["nodePoolName!=some-name"]Sort results by a parameters.
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.
50Filter results by a free text search.
test projectok
1Bad request.
Unauthorized
Forbidden
unexpected error
GET /api/v1/org-unit/departments/node-pool-resources HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"nodePoolResources": [
{
"id": "text",
"orgUnitId": "text",
"orgUnitName": "organization1",
"clusterId": "text",
"nodePoolId": "text",
"nodePoolName": "text",
"rank": "text",
"resources": {
"gpu": {
"deserved": 1000,
"limit": 0,
"overQuotaWeight": 2
},
"cpu": {
"deserved": 1000,
"limit": 0,
"overQuotaWeight": 2
},
"memory": {
"deserved": 1000,
"limit": 0,
"overQuotaWeight": 2,
"units": "Mib"
}
}
}
],
"next": 1
}Count departments node pool resources
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 >=.
["nodePoolName!=some-name"]Filter results by a free text search.
test projectok
1Bad request.
Unauthorized
Forbidden
unexpected error
GET /api/v1/org-unit/departments/node-pool-resources/count HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1
}Partially updates node pool resource quotas for multiple departments in a single request.
Bearer authentication
Batch of node pool resources patch requests.
Batch patch processed. Returns succeeded and failed items with totals and a batch id.
The unique ID of the batch operation.
Total number of items requested in the batch.
Number of items successfully processed.
Number of items that failed.
Bad request.
Unauthorized
Forbidden
unexpected error
unexpected error
POST /api/v1/org-unit/departments/node-pool-resources/batch-patch HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 244
{
"patchRequests": [
{
"orgUnitId": "3845",
"nodePoolId": "22",
"rank": "Low",
"resources": {
"gpu": {
"deserved": 2,
"limit": 2,
"overQuotaWeight": 2
}
}
},
{
"orgUnitId": "27552",
"nodePoolId": "33",
"resources": {
"cpu": {
"deserved": 20,
"limit": 20,
"overQuotaWeight": 20
}
}
}
]
}{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"succeeded": [
{
"orgUnitId": "435",
"orgUnitName": "proj1",
"nodePoolId": "12",
"nodePoolName": "default",
"resources": [
{
"gpu": {
"deserved": 2,
"limit": 2,
"overQuotaWeight": 2
}
}
]
}
],
"failed": [
{
"payload": {
"orgUnitId": "577",
"nodePoolId": "12",
"resources": [
{
"gpu": {
"deserved": 2,
"limit": 2,
"overQuotaWeight": 2
}
}
]
},
"code": 404,
"message": "department not found"
}
],
"totalRequested": 2,
"totalSuccessful": 1,
"totalFailed": 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.
1Pattern: .*Start 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"
}
]
}
}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"
}
]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