Projects

Projects implement resource allocation policies and create segregation between different initiatives. It can represent a team, an individual, or an initiative that shares resources or has a specific resources budget (quota). See Projects for more information.

Create project

Create a project

SecuritybearerAuth
Request
Request Body schema: application/json
required

Project to create.

object or null
defaultNodePools
Array of strings or null

default order of node pools for workloads. will be enforced if no list is defined in workload policy

object (NodeTypesPerWorkload)
required
Array of objects (Resources)

Resources assigned to this Organization per Node Pool

name
required
string
clusterId
required
string <uuid> (ClusterId)

The id of the cluster.

requestedNamespace
string

project's requested namespace

parentId
string or null

department parent uuid

Responses
201

Created

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

post/api/v1/org-unit/projects
Request samples
application/json
{
  • "schedulingRules": {
    },
  • "defaultNodePools": [
    ],
  • "nodeTypes": {
    },
  • "resources": [
    ],
  • "name": "organization1",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "requestedNamespace": "runai-proj1",
  • "parentId": "53a9228e-a722-420d-a102-9dc90da2efca"
}
Response samples
application/json
{
  • "schedulingRules": {
    },
  • "defaultNodePools": [
    ],
  • "nodeTypes": {
    },
  • "resources": [
    ],
  • "name": "organization1",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "id": 33,
  • "parentId": "53a9228e-a722-420d-a102-9dc90da2efca",
  • "requestedNamespace": "runai-proj1",
  • "status": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "string",
  • "updatedBy": "string",
  • "parent": {
    }
}

Get projects

List projects

SecuritybearerAuth
Request
query Parameters
filterBy
Array of strings

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 >=.

Example: filterBy=name!=some-name
sortBy
string

Sort results by a parameters.

Enum: "name" "clusterId" "departmentId" "createdAt"
sortOrder
string
Default: "asc"

Sort results in descending or ascending order.

Enum: "asc" "desc"
offset
integer <int32>

The offset of the first item returned in the collection.

Example: offset=100
limit
integer <int32> [ 1 .. 500 ]
Default: 50

The maximum number of entries to return.

Responses
200

ok

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

get/api/v1/org-unit/projects
Response samples
application/json
{
  • "projects": [
    ],
  • "next": 1
}

Update project

Get projects telemetry data by the given query parameters

SecuritybearerAuth
Request
path Parameters
projectId
required
string

The project id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Request Body schema: application/json
required

Project to update.

object or null
defaultNodePools
Array of strings or null

default order of node pools for workloads. will be enforced if no list is defined in workload policy

object (NodeTypesPerWorkload)
required
Array of objects (Resources)

Resources assigned to this Organization per Node Pool

Responses
200

Updated

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

put/api/v1/org-unit/projects/{projectId}
Request samples
application/json
{
  • "schedulingRules": {
    },
  • "defaultNodePools": [
    ],
  • "nodeTypes": {
    },
  • "resources": [
    ]
}
Response samples
application/json
{
  • "schedulingRules": {
    },
  • "defaultNodePools": [
    ],
  • "nodeTypes": {
    },
  • "resources": [
    ],
  • "name": "organization1",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "id": 33,
  • "parentId": "53a9228e-a722-420d-a102-9dc90da2efca",
  • "requestedNamespace": "runai-proj1",
  • "status": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "string",
  • "updatedBy": "string",
  • "parent": {
    }
}

Get project

Get a project by id

SecuritybearerAuth
Request
path Parameters
projectId
required
string

The project id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Responses
200

ok

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

get/api/v1/org-unit/projects/{projectId}
Response samples
application/json
{
  • "schedulingRules": {
    },
  • "defaultNodePools": [
    ],
  • "nodeTypes": {
    },
  • "resources": [
    ],
  • "name": "organization1",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "id": 33,
  • "parentId": "53a9228e-a722-420d-a102-9dc90da2efca",
  • "requestedNamespace": "runai-proj1",
  • "status": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "string",
  • "updatedBy": "string",
  • "parent": {
    }
}

Delete project

Delete a project

SecuritybearerAuth
Request
path Parameters
projectId
required
string

The project id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Responses
204

Deleted

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

delete/api/v1/org-unit/projects/{projectId}
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Update project resources

Update projects resources

SecuritybearerAuth
Request
path Parameters
projectId
required
string

The project id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Request Body schema: application/json
required

Project resources to update.

Array
object or null

the node pool which the resources refer to

required
object

GPU number to the project in the node pool

object or null

CPU in Millicores to the project in the node pool

object or null

Memory to the project in the node pool

Responses
200

Updated

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

put/api/v1/org-unit/projects/{projectId}/resources
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
[
  • {
    }
]

Patch project resources

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.

SecuritybearerAuth
Request
path Parameters
projectId
required
string

The project id

Example: 575c19e8-c7c3-45b0-8290-2f47397a8383
Request Body schema: application/json
required

Project resources to patch.

Array
object or null

the node pool which the resources refer to

required
object

GPU number to the project in the node pool

object or null

CPU in Millicores to the project in the node pool

object or null

Memory to the project in the node pool

Responses
200

Updated

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

503

unexpected error

patch/api/v1/org-unit/projects/{projectId}/resources
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
[
  • {
    }
]

Get metrics data for all projects.Deprecated

Retrieves data from the metrics database. \n Use in reporting and analysis tools. \n Use a time range to return historical data (optional). If you use a start date, an end date is required.

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
start
string <date-time>

Start of time range to fetch data from in UTC format.

Example: start=2023-06-06 12:09:18.211
end
string <date-time>

End of time range to fetch data from in UTC format.

Example: end=2023-06-07 12:09:18.211
numberOfSamples
integer [ 0 .. 1000 ]
Default: 20

The number of samples to take in the specified time range.

Example: numberOfSamples=20
nodepoolName
string

Filter by unique nodepool name.

Example: nodepoolName=default
Responses
200

Successfully retrieved metrics for all projects.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/v1/k8s/clusters/{clusterUuid}/projects/metrics
Response samples
application/json
{
  • "data": [
    ],
  • "timeRange": {
    }
}

Get metrics data for a specific project.Deprecated

Retrieves data from the metrics database. \n Use in reporting and analysis tools. \n Use a time range to return historical data (optional). If you use a start date, an end date is required.

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
projectId
required
string

The unique project-id of the project.

query Parameters
start
string <date-time>

Start of time range to fetch data from in UTC format.

Example: start=2023-06-06 12:09:18.211
end
string <date-time>

End of time range to fetch data from in UTC format.

Example: end=2023-06-07 12:09:18.211
numberOfSamples
integer [ 0 .. 1000 ]
Default: 20

The number of samples to take in the specified time range.

Example: numberOfSamples=20
nodepoolName
string

Filter by unique nodepool name.

Example: nodepoolName=default
Responses
200

Successfully retrieved metrics for the project.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/v1/k8s/clusters/{clusterUuid}/projects/{projectId}/metrics
Response samples
application/json
{
  • "metadata": {
    },
  • "current": {
    },
  • "timeRange": {
    }
}

Create a new project.Deprecated

Creates a new project in a specific cluster.

SecuritybearerAuth
Request
path Parameters
clusterId
required
string

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
excludePermissions
boolean

Backward compatibility of the permissions field. If true, the permissions field in the request body is ignored. If false, relevant access rules for the permissions field are created in the project scope.

Example: excludePermissions=true
Request Body schema: application/json
required
name
required
string

Project Name

departmentId
required
integer <int32>

ID of the department that owns the project.

Array of objects (NodePoolAssignedResourcesCreate)

Resources assigned to this Project per Node Pool.

namespace
string

The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher.

deservedGpus
number
Deprecated

Deprecated. Use 'deserved' for the relevant resource type under NodePoolResources. The project's deserved GPU allocation in case the cluster has those resources.

maxAllowedGpus
number
Deprecated

Deprecated. Instead, use maxAllowed for the relevant resource type under NodePoolResources. An upper limit for the amount of GPUs the project can get (Even if over quota is allowed and resources are available).

gpuOverQuotaWeight
number [ 0 .. 3 ]
Deprecated

Deprecated. Instead, use overQuotaWeight for the relevant resource type under NodePoolResources. The priority the project gets for over quota resources.

defaultNodePools
Array of strings

Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.

interactiveJobTimeLimitSecs
number

A limit (in seconds) for the duration of interactive jobs from this project.

interactiveJobMaxIdleDurationSecs
number

Maximum duration (in seconds) that an interactive job can be idle before being terminated.

interactivePreemptibleJobMaxIdleDurationSecs
number

Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated.

trainingJobTimeLimitSecs
number

A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12

trainingJobMaxIdleDurationSecs
number

Maximum duration (in seconds) that a training job can be idle before being terminated.

object

Node affinity configuration for jobs in the project.

object
Deprecated

Deprecated. Instead, use the accessRules API to add permissions to a specific subject in the project scope.

object
Deprecated

Deprecated. Instead, use nodePoolsResources. Total resources assigned to the Project. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in GET are the sum of all Node Pool Resources.

Responses
200

Project created successfully.

400

Bad Project request.

409

Project creation failed.

post/v1/k8s/clusters/{clusterId}/projects
Request samples
application/json
{
  • "name": "team-a",
  • "departmentId": 2,
  • "nodePoolsResources": [
    ],
  • "namespace": "ns-proj1",
  • "deservedGpus": 3,
  • "maxAllowedGpus": 5,
  • "gpuOverQuotaWeight": 1,
  • "defaultNodePools": [
    ],
  • "interactiveJobTimeLimitSecs": 3600,
  • "interactiveJobMaxIdleDurationSecs": 3000,
  • "interactivePreemptibleJobMaxIdleDurationSecs": 3000,
  • "trainingJobTimeLimitSecs": 3600,
  • "trainingJobMaxIdleDurationSecs": 3000,
  • "nodeAffinity": {
    },
  • "permissions": {
    },
  • "resources": {
    }
}
Response samples
application/json
{
  • "deservedGpus": 3,
  • "maxAllowedGpus": 5,
  • "gpuOverQuotaWeight": 1,
  • "defaultNodePools": [
    ],
  • "interactiveJobTimeLimitSecs": 3600,
  • "interactiveJobMaxIdleDurationSecs": 3000,
  • "interactivePreemptibleJobMaxIdleDurationSecs": 3000,
  • "trainingJobTimeLimitSecs": 3600,
  • "trainingJobMaxIdleDurationSecs": 3000,
  • "nodeAffinity": {
    },
  • "permissions": {
    },
  • "resources": {
    }
}

List all projects and their details.Deprecated

Retrieves a list of all projects and details from a specific cluster. \n Use in reporting and analysis tools.

SecuritybearerAuth
Request
path Parameters
clusterId
required
string

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
excludePermissions
boolean

Backward compatibility of the 'permissions' field. If 'true', the 'permissions' field in the returned projects is not set. If 'false', the 'permissions' field is set in the returned projects.

Example: excludePermissions=true
memoryUnitMb
boolean

Memory returned in MB. When set to false (default) memory will be returned in MiB.

Example: memoryUnitMb=true
Responses
200

Successfully retrieved a list of all the projects.

get/v1/k8s/clusters/{clusterId}/projects
Response samples
application/json
[
  • {
    }
]

Update a project.Deprecated

Updates a project's details in a specific cluster. \n For example, node pool resources, and others.

SecuritybearerAuth
Request
path Parameters
id
required
string

The unique project-id.

clusterId
required
string

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
excludePermissions
boolean

Backward compatibility of the permissions field. If true, the permissions field in the returned projects is not set. If false, the permissions field is set in the returned projects.

Example: excludePermissions=true
Request Body schema: application/json
required
Array of objects (NodePoolAssignedResources)

Resources assigned to this Project per Node Pool.

deservedGpus
number
Deprecated

Deprecated. Use 'deserved' for the relevant resource type under NodePoolResources. The project's deserved GPU allocation in case the cluster has those resources.

maxAllowedGpus
number
Deprecated

Deprecated. Instead, use maxAllowed for the relevant resource type under NodePoolResources. An upper limit for the amount of GPUs the project can get (Even if over quota is allowed and resources are available).

gpuOverQuotaWeight
number [ 0 .. 3 ]
Deprecated

Deprecated. Instead, use overQuotaWeight for the relevant resource type under NodePoolResources. The priority the project gets for over quota resources.

defaultNodePools
Array of strings

Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.

interactiveJobTimeLimitSecs
number

A limit (in seconds) for the duration of interactive jobs from this project.

interactiveJobMaxIdleDurationSecs
number

Maximum duration (in seconds) that an interactive job can be idle before being terminated.

interactivePreemptibleJobMaxIdleDurationSecs
number

Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated.

trainingJobTimeLimitSecs
number

A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12

trainingJobMaxIdleDurationSecs
number

Maximum duration (in seconds) that a training job can be idle before being terminated.

object

Node affinity configuration for jobs in the project.

object
Deprecated

Deprecated. Instead, use the accessRules API to add permissions to a specific subject in the project scope.

object
Deprecated

Deprecated. Instead, use nodePoolsResources. Total resources assigned to the Project. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in GET are the sum of all Node Pool Resources.

Responses
200

An updated project details.

400

Bad project request.

404

Project not found.

409

Could not update the project.

put/v1/k8s/clusters/{clusterId}/projects/{id}
Request samples
application/json
{
  • "deservedGpus": 3,
  • "maxAllowedGpus": 5,
  • "gpuOverQuotaWeight": 1,
  • "defaultNodePools": [
    ],
  • "interactiveJobTimeLimitSecs": 3600,
  • "interactiveJobMaxIdleDurationSecs": 3000,
  • "interactivePreemptibleJobMaxIdleDurationSecs": 3000,
  • "trainingJobTimeLimitSecs": 3600,
  • "trainingJobMaxIdleDurationSecs": 3000,
  • "nodeAffinity": {
    },
  • "permissions": {
    },
  • "resources": {
    }
}
Response samples
application/json
{
  • "deservedGpus": 3,
  • "maxAllowedGpus": 5,
  • "gpuOverQuotaWeight": 1,
  • "defaultNodePools": [
    ],
  • "interactiveJobTimeLimitSecs": 3600,
  • "interactiveJobMaxIdleDurationSecs": 3000,
  • "interactivePreemptibleJobMaxIdleDurationSecs": 3000,
  • "trainingJobTimeLimitSecs": 3600,
  • "trainingJobMaxIdleDurationSecs": 3000,
  • "nodeAffinity": {
    },
  • "permissions": {
    },
  • "resources": {
    }
}

Delete a project.Deprecated

Deletes a project from a specific cluster.

SecuritybearerAuth
Request
path Parameters
clusterId
required
string

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
id
required
integer

The unique id of the project.

Example: 2
Responses
200

Project deleted successfully.

404

Project not found.

delete/v1/k8s/clusters/{clusterId}/projects/{id}
Response samples
application/json
{
  • "deservedGpus": 3,
  • "maxAllowedGpus": 5,
  • "gpuOverQuotaWeight": 1,
  • "defaultNodePools": [
    ],
  • "interactiveJobTimeLimitSecs": 3600,
  • "interactiveJobMaxIdleDurationSecs": 3000,
  • "interactivePreemptibleJobMaxIdleDurationSecs": 3000,
  • "trainingJobTimeLimitSecs": 3600,
  • "trainingJobMaxIdleDurationSecs": 3000,
  • "nodeAffinity": {
    },
  • "permissions": {
    },
  • "resources": {
    }
}

List details of a specific project.Deprecated

Retrieves the details of a specific project from a specific cluster. \n Use for project analysis. \n Requires view permissions to the queried project.

SecuritybearerAuth
Request
path Parameters
clusterId
required
string

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
id
required
string

The unique project-id identifying the project.

query Parameters
excludePermissions
boolean

Backward compatibility of the 'permissions' field. If 'true', the 'permissions' field in the returned projects is not set. If 'false', the 'permissions' field is set in the returned projects.

Example: excludePermissions=true
Responses
200

Successfully retrieved project details.

404

Project not found.

get/v1/k8s/clusters/{clusterId}/projects/{id}
Response samples
application/json
{
  • "deservedGpus": 3,
  • "maxAllowedGpus": 5,
  • "gpuOverQuotaWeight": 1,
  • "defaultNodePools": [
    ],
  • "interactiveJobTimeLimitSecs": 3600,
  • "interactiveJobMaxIdleDurationSecs": 3000,
  • "interactivePreemptibleJobMaxIdleDurationSecs": 3000,
  • "trainingJobTimeLimitSecs": 3600,
  • "trainingJobMaxIdleDurationSecs": 3000,
  • "nodeAffinity": {
    },
  • "permissions": {
    },
  • "resources": {
    }
}