# 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](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) for more information.

## Get projects

> List projects

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ProjectsFilterBy":{"name":"filterBy","in":"query","required":false,"description":"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 >=.","schema":{"type":"array","items":{"type":"string","pattern":"^(name|clusterId|departmentId|parentId|parentName|phase|totalGpuQuota|gpuAllocated|createdAt|avgGpuAllocation24h|avgGpuUtilization24h|avgGpuAllocation7d|avgGpuUtilization7d|avgGpuAllocation30d|avgGpuUtilization30d)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"ProjectsSortBy":{"name":"sortBy","in":"query","required":false,"description":"Sort results by a parameters.","schema":{"$ref":"#/components/schemas/ProjectFilterSortFields"}},"SortOrder":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"Limit":{"name":"limit","in":"query","required":false,"description":"The maximum number of entries to return.","schema":{"type":"integer","format":"int32","default":50,"minimum":1,"maximum":500}}},"schemas":{"ProjectFilterSortFields":{"type":"string","enum":["name","clusterId","departmentId","parentId","parentName","phase","totalGpuQuota","gpuAllocated","createdAt","avgGpuAllocation24h","avgGpuUtilization24h","avgGpuAllocation7d","avgGpuUtilization7d","avgGpuAllocation30d","avgGpuUtilization30d"]},"Project":{"allOf":[{"$ref":"#/components/schemas/DataFields"},{"type":"object","required":["id","name","parentId","createdAt","updatedAt","totalResources","effective","status","description"],"properties":{"id":{"type":"string"},"parentId":{"type":"string","description":"department parent uuid"},"requestedNamespace":{"type":"string","description":"the project's namespace only if requested","nullable":true},"status":{"$ref":"#/components/schemas/ProjectStatus"},"totalResources":{"$ref":"#/components/schemas/TotalResources"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"},"effective":{"$ref":"#/components/schemas/ProjectEffective"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"DataFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}}]},"DataUpdatableFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"project's description"},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}},"SchedulingRules":{"type":"object","nullable":true,"properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"properties":{"training":{"type":"array","description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}},"description":"the node pool which the resources refer to","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"GPU number to the project in the node pool"}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"CPU in Millicores to the project in the node pool"}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Memory to the project in the node pool","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"NonNullResource":{"required":["deserved"],"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources"},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"units":{"type":"string","enum":["Mib","MB","GB"]},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"ProjectStatus":{"type":"object","properties":{"namespace":{"type":"string","description":"the project's namespace","nullable":true},"phase":{"$ref":"#/components/schemas/ProjectPhase","description":"the project's phase"},"phaseMessage":{"type":"string","description":"the project's phase message","nullable":true},"nodePoolQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/QuotaStatusNodePool"}},"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"},"additionalStatusData":{"nullable":true,"type":"object","additionalProperties":true}}},"ProjectPhase":{"type":"string","enum":["Creating","Updating","Deleting","Initializing","Ready","NotReady","Unknown"]},"QuotaStatusNodePool":{"allOf":[{"$ref":"#/components/schemas/QuotaStatus"},{"type":"object","required":["nodePoolName","nodePoolId"],"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to"},"nodePoolId":{"type":"string","description":"The node pool id which the current quota status refers to"}}}]},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","description":"Total memory quota of the org unit in MB","nullable":true}}},"DepartmentProjectParent":{"type":"object","nullable":true,"description":"Department or project parent","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"}}},"ProjectEffective":{"properties":{"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","description":"The average gpu utilization percentage of the project/department."},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/projects":{"get":{"summary":"Get projects","operationId":"get_projects","description":"List projects","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/ProjectsFilterBy"},{"$ref":"#/components/parameters/ProjectsSortBy"},{"$ref":"#/components/parameters/SortOrder"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","required":["projects"],"properties":{"projects":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Project"},{"required":["id","name","status","phase","createdAt","updatedAt"]}]}},"next":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Create project

> Create a project

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ProjectCreationRequest":{"allOf":[{"$ref":"#/components/schemas/DataFields"},{"type":"object","properties":{"requestedNamespace":{"type":"string","description":"project's requested namespace"},"parentId":{"type":"string","description":"department parent uuid","nullable":true}}}]},"DataFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}}]},"DataUpdatableFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"project's description"},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}},"SchedulingRules":{"type":"object","nullable":true,"properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"properties":{"training":{"type":"array","description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}},"description":"the node pool which the resources refer to","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"GPU number to the project in the node pool"}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"CPU in Millicores to the project in the node pool"}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Memory to the project in the node pool","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"NonNullResource":{"required":["deserved"],"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources"},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"units":{"type":"string","enum":["Mib","MB","GB"]},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Project":{"allOf":[{"$ref":"#/components/schemas/DataFields"},{"type":"object","required":["id","name","parentId","createdAt","updatedAt","totalResources","effective","status","description"],"properties":{"id":{"type":"string"},"parentId":{"type":"string","description":"department parent uuid"},"requestedNamespace":{"type":"string","description":"the project's namespace only if requested","nullable":true},"status":{"$ref":"#/components/schemas/ProjectStatus"},"totalResources":{"$ref":"#/components/schemas/TotalResources"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"},"effective":{"$ref":"#/components/schemas/ProjectEffective"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"ProjectStatus":{"type":"object","properties":{"namespace":{"type":"string","description":"the project's namespace","nullable":true},"phase":{"$ref":"#/components/schemas/ProjectPhase","description":"the project's phase"},"phaseMessage":{"type":"string","description":"the project's phase message","nullable":true},"nodePoolQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/QuotaStatusNodePool"}},"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"},"additionalStatusData":{"nullable":true,"type":"object","additionalProperties":true}}},"ProjectPhase":{"type":"string","enum":["Creating","Updating","Deleting","Initializing","Ready","NotReady","Unknown"]},"QuotaStatusNodePool":{"allOf":[{"$ref":"#/components/schemas/QuotaStatus"},{"type":"object","required":["nodePoolName","nodePoolId"],"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to"},"nodePoolId":{"type":"string","description":"The node pool id which the current quota status refers to"}}}]},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","description":"Total memory quota of the org unit in MB","nullable":true}}},"DepartmentProjectParent":{"type":"object","nullable":true,"description":"Department or project parent","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"}}},"ProjectEffective":{"properties":{"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","description":"The average gpu utilization percentage of the project/department."},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/projects":{"post":{"summary":"Create project","operationId":"create_project","description":"Create a project","tags":["Projects"],"requestBody":{"description":"Project to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreationRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get project

> Get a project by id

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ProjectId":{"name":"projectId","in":"path","required":true,"description":"The project id","schema":{"type":"string"}}},"schemas":{"Project":{"allOf":[{"$ref":"#/components/schemas/DataFields"},{"type":"object","required":["id","name","parentId","createdAt","updatedAt","totalResources","effective","status","description"],"properties":{"id":{"type":"string"},"parentId":{"type":"string","description":"department parent uuid"},"requestedNamespace":{"type":"string","description":"the project's namespace only if requested","nullable":true},"status":{"$ref":"#/components/schemas/ProjectStatus"},"totalResources":{"$ref":"#/components/schemas/TotalResources"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"},"effective":{"$ref":"#/components/schemas/ProjectEffective"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"DataFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}}]},"DataUpdatableFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"project's description"},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}},"SchedulingRules":{"type":"object","nullable":true,"properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"properties":{"training":{"type":"array","description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}},"description":"the node pool which the resources refer to","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"GPU number to the project in the node pool"}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"CPU in Millicores to the project in the node pool"}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Memory to the project in the node pool","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"NonNullResource":{"required":["deserved"],"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources"},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"units":{"type":"string","enum":["Mib","MB","GB"]},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"ProjectStatus":{"type":"object","properties":{"namespace":{"type":"string","description":"the project's namespace","nullable":true},"phase":{"$ref":"#/components/schemas/ProjectPhase","description":"the project's phase"},"phaseMessage":{"type":"string","description":"the project's phase message","nullable":true},"nodePoolQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/QuotaStatusNodePool"}},"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"},"additionalStatusData":{"nullable":true,"type":"object","additionalProperties":true}}},"ProjectPhase":{"type":"string","enum":["Creating","Updating","Deleting","Initializing","Ready","NotReady","Unknown"]},"QuotaStatusNodePool":{"allOf":[{"$ref":"#/components/schemas/QuotaStatus"},{"type":"object","required":["nodePoolName","nodePoolId"],"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to"},"nodePoolId":{"type":"string","description":"The node pool id which the current quota status refers to"}}}]},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","description":"Total memory quota of the org unit in MB","nullable":true}}},"DepartmentProjectParent":{"type":"object","nullable":true,"description":"Department or project parent","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"}}},"ProjectEffective":{"properties":{"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","description":"The average gpu utilization percentage of the project/department."},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/projects/{projectId}":{"get":{"summary":"Get project","operationId":"get_project","description":"Get a project by id","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/ProjectId"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update project

> Get projects telemetry data by the given query parameters

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ProjectId":{"name":"projectId","in":"path","required":true,"description":"The project id","schema":{"type":"string"}}},"schemas":{"ProjectUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableFields"}]},"DataUpdatableFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"project's description"},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}},"SchedulingRules":{"type":"object","nullable":true,"properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"properties":{"training":{"type":"array","description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}},"description":"the node pool which the resources refer to","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"GPU number to the project in the node pool"}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"CPU in Millicores to the project in the node pool"}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Memory to the project in the node pool","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"NonNullResource":{"required":["deserved"],"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources"},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"units":{"type":"string","enum":["Mib","MB","GB"]},"Project":{"allOf":[{"$ref":"#/components/schemas/DataFields"},{"type":"object","required":["id","name","parentId","createdAt","updatedAt","totalResources","effective","status","description"],"properties":{"id":{"type":"string"},"parentId":{"type":"string","description":"department parent uuid"},"requestedNamespace":{"type":"string","description":"the project's namespace only if requested","nullable":true},"status":{"$ref":"#/components/schemas/ProjectStatus"},"totalResources":{"$ref":"#/components/schemas/TotalResources"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"},"effective":{"$ref":"#/components/schemas/ProjectEffective"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"DataFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}}]},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"ProjectStatus":{"type":"object","properties":{"namespace":{"type":"string","description":"the project's namespace","nullable":true},"phase":{"$ref":"#/components/schemas/ProjectPhase","description":"the project's phase"},"phaseMessage":{"type":"string","description":"the project's phase message","nullable":true},"nodePoolQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/QuotaStatusNodePool"}},"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"},"additionalStatusData":{"nullable":true,"type":"object","additionalProperties":true}}},"ProjectPhase":{"type":"string","enum":["Creating","Updating","Deleting","Initializing","Ready","NotReady","Unknown"]},"QuotaStatusNodePool":{"allOf":[{"$ref":"#/components/schemas/QuotaStatus"},{"type":"object","required":["nodePoolName","nodePoolId"],"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to"},"nodePoolId":{"type":"string","description":"The node pool id which the current quota status refers to"}}}]},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","description":"Total memory quota of the org unit in MB","nullable":true}}},"DepartmentProjectParent":{"type":"object","nullable":true,"description":"Department or project parent","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"parent":{"$ref":"#/components/schemas/DepartmentProjectParent"}}},"ProjectEffective":{"properties":{"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"default order of node pools for workloads. will be enforced if no list is defined in workload policy","type":"array","nullable":true,"items":{"type":"string"}},"nodeTypes":{"description":"default node types configuration for workloads. will be enforced if no node type is configured in workload policy","nullable":true,"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","description":"The average gpu utilization percentage of the project/department."},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/projects/{projectId}":{"put":{"summary":"Update project","operationId":"update_project","description":"Get projects telemetry data by the given query parameters","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/ProjectId"}],"requestBody":{"description":"Project to update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdateRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete project

> Delete a project

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ProjectId":{"name":"projectId","in":"path","required":true,"description":"The project id","schema":{"type":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/org-unit/projects/{projectId}":{"delete":{"summary":"Delete project","operationId":"delete_project","description":"Delete a project","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/ProjectId"}],"responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update project resources

> Update projects resources

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ProjectId":{"name":"projectId","in":"path","required":true,"description":"The project id","schema":{"type":"string"}}},"schemas":{"ResourcesUpdateRequest":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Project per Node Pool"},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}},"description":"the node pool which the resources refer to","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"GPU number to the project in the node pool"}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"CPU in Millicores to the project in the node pool"}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Memory to the project in the node pool","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"NonNullResource":{"required":["deserved"],"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources"},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"units":{"type":"string","enum":["Mib","MB","GB"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/projects/{projectId}/resources":{"put":{"summary":"Update project resources","operationId":"update_project_resources","description":"Update projects resources","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/ProjectId"}],"requestBody":{"description":"Project resources to update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourcesUpdateRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resources"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

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

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ProjectId":{"name":"projectId","in":"path","required":true,"description":"The project id","schema":{"type":"string"}}},"schemas":{"ResourcesUpdateRequest":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Project per Node Pool"},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}},"description":"the node pool which the resources refer to","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"GPU number to the project in the node pool"}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"CPU in Millicores to the project in the node pool"}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Memory to the project in the node pool","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"NonNullResource":{"required":["deserved"],"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources"},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true},"limit":{"type":"number","description":"Maximum amount of resources the project can get","nullable":true},"overQuotaWeight":{"type":"number","description":"The priority the project gets for over quota resources","nullable":true}}},"units":{"type":"string","enum":["Mib","MB","GB"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/projects/{projectId}/resources":{"patch":{"summary":"Patch project resources","operationId":"patch_project_resources","description":"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.","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/ProjectId"}],"requestBody":{"description":"Project resources to patch.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourcesUpdateRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resources"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Count projects

> count projects

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ProjectsFilterBy":{"name":"filterBy","in":"query","required":false,"description":"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 >=.","schema":{"type":"array","items":{"type":"string","pattern":"^(name|clusterId|departmentId|parentId|parentName|phase|totalGpuQuota|gpuAllocated|createdAt|avgGpuAllocation24h|avgGpuUtilization24h|avgGpuAllocation7d|avgGpuUtilization7d|avgGpuAllocation30d|avgGpuUtilization30d)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/org-unit/projects/count":{"get":{"summary":"Count projects","operationId":"count_projects","description":"count projects","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/ProjectsFilterBy"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","required":["count"],"properties":{"count":{"type":"integer","format":"int64"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get metrics data for all projects.

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

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ClusterUuid":{"name":"clusterUuid","in":"path","required":true,"description":"The Universally Unique Identifier (UUID) of the cluster.","schema":{"type":"string","format":"uuid","minLength":1}},"Start":{"name":"start","in":"query","description":"Start of time range to fetch data from in UTC format.","required":false,"schema":{"type":"string","format":"date-time"}},"End":{"name":"end","in":"query","description":"End of time range to fetch data from in UTC format.","required":false,"schema":{"type":"string","format":"date-time"}},"NumberOfSamples":{"name":"numberOfSamples","in":"query","description":"The number of samples to take in the specified time range.","required":false,"schema":{"type":"integer","maximum":1000,"minimum":0,"default":20}},"NodepoolName":{"in":"query","name":"nodepoolName","schema":{"type":"string"},"required":false,"description":"Filter by unique nodepool name."}},"schemas":{"projects":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Project1"},{"properties":{"timeRange":{}}}]}},"timeRange":{"$ref":"#/components/schemas/TimeRange"}}},"Project1":{"type":"object","required":["metadata","current"],"properties":{"metadata":{"type":"object","required":["projectId","projectName","departmentId","departmentName","clusterId","clusterName"],"properties":{"projectId":{"$ref":"#/components/schemas/ProjectId"},"projectName":{"$ref":"#/components/schemas/ProjectName1"},"departmentId":{"$ref":"#/components/schemas/DepartmentId"},"departmentName":{"$ref":"#/components/schemas/DepartmentName"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"clusterName":{"$ref":"#/components/schemas/ClusterName"}}},"current":{"type":"object","required":["resources","nodepoolResources"],"description":"Current reported metrics data. resources holds data that is summed up to the project level and projectResources explains the division of it to nodepools","properties":{"resources":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ResourcesData"},{"type":"object","required":["nodepoolName"],"properties":{"nodepoolName":{"$ref":"#/components/schemas/NodepoolName"}}}]}}}},"timeRange":{"$ref":"#/components/schemas/TimeRange"}}},"ProjectId":{"type":"integer"},"ProjectName1":{"type":"string"},"DepartmentId":{"description":"The id of the department","type":"integer","format":"int32","minimum":1},"DepartmentName":{"type":"string"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"ClusterName":{"type":"string"},"ResourcesData":{"type":"object","required":["numberOfPendingWorkloads","gpu","cpu","memory"],"properties":{"numberOfPendingWorkloads":{"type":"integer"},"gpu":{"description":"GPU resources in fractions. 0.7 = 70% of a gpu","$ref":"#/components/schemas/ResourceData"},"cpu":{"description":"CPU resources in millicpus. 1000 = 1 cpu","$ref":"#/components/schemas/ResourceData"},"memory":{"description":"Memory resources in megabytes. 1 = 10^6  (1000*1000)","$ref":"#/components/schemas/ResourceData"}}},"ResourceData":{"type":"object","description":"quota equals to the given resources and allocated equal to the real count of used resources","required":["quota","allocated"],"properties":{"quota":{"type":"number"},"allocated":{"type":"number"},"utilization":{"type":"number"}}},"NodepoolName":{"type":"string"},"TimeRange":{"type":"object","description":"Overtime metrics data. Returned only if both start and end query parameters are set.","required":["resources"],"properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourcesDataOvertime"}}}},"ResourcesDataOvertime":{"allOf":[{"$ref":"#/components/schemas/ResourcesData"},{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"string","format":"date-time"}}}]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/clusters/{clusterUuid}/projects/metrics":{"get":{"tags":["Projects"],"deprecated":true,"summary":"Get metrics data for all projects.","operationId":"getProjectsMetrics","description":"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.","parameters":[{"$ref":"#/components/parameters/ClusterUuid"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/NumberOfSamples"},{"$ref":"#/components/parameters/NodepoolName"}],"responses":{"200":{"description":"Successfully retrieved metrics for all projects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get metrics data for a specific project.

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

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"ClusterUuid":{"name":"clusterUuid","in":"path","required":true,"description":"The Universally Unique Identifier (UUID) of the cluster.","schema":{"type":"string","format":"uuid","minLength":1}},"ProjectId1":{"in":"path","name":"projectId","schema":{"type":"string"},"required":true,"description":"The unique project-id of the project."},"Start":{"name":"start","in":"query","description":"Start of time range to fetch data from in UTC format.","required":false,"schema":{"type":"string","format":"date-time"}},"End":{"name":"end","in":"query","description":"End of time range to fetch data from in UTC format.","required":false,"schema":{"type":"string","format":"date-time"}},"NumberOfSamples":{"name":"numberOfSamples","in":"query","description":"The number of samples to take in the specified time range.","required":false,"schema":{"type":"integer","maximum":1000,"minimum":0,"default":20}},"NodepoolName":{"in":"query","name":"nodepoolName","schema":{"type":"string"},"required":false,"description":"Filter by unique nodepool name."}},"schemas":{"project":{"type":"object","required":["metadata","current"],"properties":{"metadata":{"type":"object","required":["projectId","projectName","departmentId","departmentName","clusterId","clusterName"],"properties":{"projectId":{"$ref":"#/components/schemas/ProjectId"},"projectName":{"$ref":"#/components/schemas/ProjectName1"},"departmentId":{"$ref":"#/components/schemas/DepartmentId"},"departmentName":{"$ref":"#/components/schemas/DepartmentName"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"clusterName":{"$ref":"#/components/schemas/ClusterName"}}},"current":{"type":"object","required":["resources","nodepoolResources"],"description":"Current reported metrics data. resources holds data that is summed up to the project level and projectResources explains the division of it to nodepools","properties":{"resources":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ResourcesData"},{"type":"object","required":["nodepoolName"],"properties":{"nodepoolName":{"$ref":"#/components/schemas/NodepoolName"}}}]}}}},"timeRange":{"$ref":"#/components/schemas/TimeRange"}}},"ProjectId":{"type":"integer"},"ProjectName1":{"type":"string"},"DepartmentId":{"description":"The id of the department","type":"integer","format":"int32","minimum":1},"DepartmentName":{"type":"string"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"ClusterName":{"type":"string"},"ResourcesData":{"type":"object","required":["numberOfPendingWorkloads","gpu","cpu","memory"],"properties":{"numberOfPendingWorkloads":{"type":"integer"},"gpu":{"description":"GPU resources in fractions. 0.7 = 70% of a gpu","$ref":"#/components/schemas/ResourceData"},"cpu":{"description":"CPU resources in millicpus. 1000 = 1 cpu","$ref":"#/components/schemas/ResourceData"},"memory":{"description":"Memory resources in megabytes. 1 = 10^6  (1000*1000)","$ref":"#/components/schemas/ResourceData"}}},"ResourceData":{"type":"object","description":"quota equals to the given resources and allocated equal to the real count of used resources","required":["quota","allocated"],"properties":{"quota":{"type":"number"},"allocated":{"type":"number"},"utilization":{"type":"number"}}},"NodepoolName":{"type":"string"},"TimeRange":{"type":"object","description":"Overtime metrics data. Returned only if both start and end query parameters are set.","required":["resources"],"properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourcesDataOvertime"}}}},"ResourcesDataOvertime":{"allOf":[{"$ref":"#/components/schemas/ResourcesData"},{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"string","format":"date-time"}}}]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/clusters/{clusterUuid}/projects/{projectId}/metrics":{"get":{"tags":["Projects"],"deprecated":true,"summary":"Get metrics data for a specific project.","operationId":"getProjectMetrics","description":"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.","parameters":[{"$ref":"#/components/parameters/ClusterUuid"},{"$ref":"#/components/parameters/ProjectId1"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/NumberOfSamples"},{"$ref":"#/components/parameters/NodepoolName"}],"responses":{"200":{"description":"Successfully retrieved metrics for the project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/project"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## List all projects and their details.

> Retrieves a list of all projects and details from a specific cluster. Use in reporting and analysis tools. Deprecated - use \`/api/v1/org-unit/projects\` instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Project2":{"allOf":[{"properties":{"name":{"type":"string","description":"Project name."},"nodePoolsResources":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolAssignedResources"},"description":"Resources assigned to this Project per Node Pool."},"namespace":{"type":"string","description":"The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher."},"id":{"type":"integer","format":"int32","description":"Project id.","readOnly":true},"departmentId":{"type":"integer","format":"int32","description":"ID of the department that owns the project."},"tenantId":{"type":"integer","format":"int32","description":"ID of the tenant where the project is located."},"clusterUuid":{"type":"string","format":"uuid","description":"ID of the cluster where the project is located."},"departmentName":{"type":"string","description":"Name of the department where the project is located."},"interactiveNodeAffinity":{"type":"string"},"trainNodeAffinity":{"type":"string"},"createdAt":{"type":"string","description":"Creation date of the project.","format":"date-time"},"status":{"$ref":"#/components/schemas/ProjectStatus1"},"phase":{"type":"string","description":"project's phase"}}},{"$ref":"#/components/schemas/ProjectCommonFields"}]},"NodePoolAssignedResources":{"required":["id"],"allOf":[{"properties":{"id":{"description":"The id of the assigned resources. Required in PUT when updating the assigned resources.","type":"number"}}},{"$ref":"#/components/schemas/NodePoolAssignedResourcesCreate"}]},"NodePoolAssignedResourcesCreate":{"required":["nodePool"],"properties":{"nodePool":{"allOf":[{"$ref":"#/components/schemas/NodePoolResources"}],"description":"The node pool which the assigned resources refer to."},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of GPUs assigned in the node pool."},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."}}},"NodePoolResources":{"required":["id"],"properties":{"id":{"type":"number","description":"Node pool id."},"name":{"type":"string","description":"Node pool name."}}},"Resource1":{"properties":{"deserved":{"type":"number","description":"The amount of resources guaranteed to be allocated in case the cluster has those resources."},"maxAllowed":{"type":"number","description":"Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use \"-1\" for unlimited over quota."},"overQuotaWeight":{"type":"number","description":"The priority for over quota resources."}}},"ProjectStatus1":{"properties":{"namespace":{"type":"string","description":"The namespace of the project"},"message":{"type":"string","description":"Detailed phase message"},"quotaStatuses":{"$ref":"#/components/schemas/NodePoolsQuotaStatuses"}}},"NodePoolsQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolQuotaStatus"},"description":"The current quota status for each node pool. Supported only for cluster versions 2.15+ or higher."},"NodePoolQuotaStatus":{"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to."},"allocated":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"requested":{"$ref":"#/components/schemas/QuotaStatusResourceList"}}},"QuotaStatusResourceList":{"properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in Mib (allocated/requested/...)."}}},"ProjectCommonFields":{"properties":{"deservedGpus":{"type":"number","description":"Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.","deprecated":true},"maxAllowedGpus":{"type":"number","description":"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).","deprecated":true},"gpuOverQuotaWeight":{"type":"number","description":"Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.","maximum":3,"minimum":0,"deprecated":true},"defaultNodePools":{"type":"array","description":"Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.","items":{"type":"string"}},"interactiveJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of interactive jobs from this project."},"interactiveJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive job can be idle before being terminated."},"interactivePreemptibleJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated."},"trainingJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12"},"trainingJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that a training job can be idle before being terminated."},"nodeAffinity":{"allOf":[{"$ref":"#/components/schemas/JobsNodeAffinity"}],"description":"Node affinity configuration for jobs in the project."},"permissions":{"allOf":[{"$ref":"#/components/schemas/ResourcePermissions"}],"description":"Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.","deprecated":true},"resources":{"allOf":[{"$ref":"#/components/schemas/AssignedResources"}],"deprecated":true,"description":"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."}}},"JobsNodeAffinity":{"properties":{"train":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for training jobs."},"interactive":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for interactive jobs."}}},"NodeAffinity":{"properties":{"affinityType":{"type":"string","enum":["no_limit","only_selected"],"description":"The type of affinity of the jobs on the nodes."},"selectedTypes":{"type":"array","items":{"$ref":"#/components/schemas/NodeTypeForProject"}}}},"NodeTypeForProject":{"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"ResourcePermissions":{"properties":{"users":{"type":"array","items":{"type":"string"},"description":"Names of users that have permissions to the project."},"groups":{"type":"array","items":{"type":"string"},"description":"Names of groups that have permissions to the project."},"applications":{"type":"array","items":{"type":"string"},"description":"Names of applications that have permissions to the project."}}},"AssignedResources":{"properties":{"id":{"type":"number"},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"GPU number assigned"},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."}}}}},"paths":{"/v1/k8s/clusters/{clusterId}/projects":{"get":{"tags":["Projects"],"deprecated":true,"summary":"List all projects and their details.","operationId":"getProjects","description":"Retrieves a list of all projects and details from a specific cluster. Use in reporting and analysis tools. Deprecated - use `/api/v1/org-unit/projects` instead.","parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true,"description":"The Universally Unique Identifier (UUID) of the cluster."},{"in":"query","name":"excludePermissions","schema":{"type":"boolean"},"required":false,"description":"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."},{"in":"query","name":"memoryUnitMb","schema":{"type":"boolean"},"required":false,"description":"Memory returned in MB. When set to `false` (default) memory will be returned in MiB."}],"responses":{"200":{"description":"Successfully retrieved a list of all the projects.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project2"}}}}}}}}}}
```

## Create a new project.

> Creates a new project in a specific cluster. Deprecated - use \`/api/v1/org-unit/projects\` instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ProjectCreateRequest":{"required":["name","departmentId"],"allOf":[{"properties":{"name":{"type":"string","description":"Project Name"},"departmentId":{"type":"integer","format":"int32","description":"ID of the department that owns the project."},"nodePoolsResources":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolAssignedResourcesCreate"},"description":"Resources assigned to this Project per Node Pool."},"namespace":{"type":"string","description":"The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher."}}},{"$ref":"#/components/schemas/ProjectCommonFields"}]},"NodePoolAssignedResourcesCreate":{"required":["nodePool"],"properties":{"nodePool":{"allOf":[{"$ref":"#/components/schemas/NodePoolResources"}],"description":"The node pool which the assigned resources refer to."},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of GPUs assigned in the node pool."},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."}}},"NodePoolResources":{"required":["id"],"properties":{"id":{"type":"number","description":"Node pool id."},"name":{"type":"string","description":"Node pool name."}}},"Resource1":{"properties":{"deserved":{"type":"number","description":"The amount of resources guaranteed to be allocated in case the cluster has those resources."},"maxAllowed":{"type":"number","description":"Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use \"-1\" for unlimited over quota."},"overQuotaWeight":{"type":"number","description":"The priority for over quota resources."}}},"ProjectCommonFields":{"properties":{"deservedGpus":{"type":"number","description":"Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.","deprecated":true},"maxAllowedGpus":{"type":"number","description":"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).","deprecated":true},"gpuOverQuotaWeight":{"type":"number","description":"Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.","maximum":3,"minimum":0,"deprecated":true},"defaultNodePools":{"type":"array","description":"Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.","items":{"type":"string"}},"interactiveJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of interactive jobs from this project."},"interactiveJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive job can be idle before being terminated."},"interactivePreemptibleJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated."},"trainingJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12"},"trainingJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that a training job can be idle before being terminated."},"nodeAffinity":{"allOf":[{"$ref":"#/components/schemas/JobsNodeAffinity"}],"description":"Node affinity configuration for jobs in the project."},"permissions":{"allOf":[{"$ref":"#/components/schemas/ResourcePermissions"}],"description":"Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.","deprecated":true},"resources":{"allOf":[{"$ref":"#/components/schemas/AssignedResources"}],"deprecated":true,"description":"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."}}},"JobsNodeAffinity":{"properties":{"train":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for training jobs."},"interactive":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for interactive jobs."}}},"NodeAffinity":{"properties":{"affinityType":{"type":"string","enum":["no_limit","only_selected"],"description":"The type of affinity of the jobs on the nodes."},"selectedTypes":{"type":"array","items":{"$ref":"#/components/schemas/NodeTypeForProject"}}}},"NodeTypeForProject":{"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"ResourcePermissions":{"properties":{"users":{"type":"array","items":{"type":"string"},"description":"Names of users that have permissions to the project."},"groups":{"type":"array","items":{"type":"string"},"description":"Names of groups that have permissions to the project."},"applications":{"type":"array","items":{"type":"string"},"description":"Names of applications that have permissions to the project."}}},"AssignedResources":{"properties":{"id":{"type":"number"},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"GPU number assigned"},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."}}},"Project2":{"allOf":[{"properties":{"name":{"type":"string","description":"Project name."},"nodePoolsResources":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolAssignedResources"},"description":"Resources assigned to this Project per Node Pool."},"namespace":{"type":"string","description":"The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher."},"id":{"type":"integer","format":"int32","description":"Project id.","readOnly":true},"departmentId":{"type":"integer","format":"int32","description":"ID of the department that owns the project."},"tenantId":{"type":"integer","format":"int32","description":"ID of the tenant where the project is located."},"clusterUuid":{"type":"string","format":"uuid","description":"ID of the cluster where the project is located."},"departmentName":{"type":"string","description":"Name of the department where the project is located."},"interactiveNodeAffinity":{"type":"string"},"trainNodeAffinity":{"type":"string"},"createdAt":{"type":"string","description":"Creation date of the project.","format":"date-time"},"status":{"$ref":"#/components/schemas/ProjectStatus1"},"phase":{"type":"string","description":"project's phase"}}},{"$ref":"#/components/schemas/ProjectCommonFields"}]},"NodePoolAssignedResources":{"required":["id"],"allOf":[{"properties":{"id":{"description":"The id of the assigned resources. Required in PUT when updating the assigned resources.","type":"number"}}},{"$ref":"#/components/schemas/NodePoolAssignedResourcesCreate"}]},"ProjectStatus1":{"properties":{"namespace":{"type":"string","description":"The namespace of the project"},"message":{"type":"string","description":"Detailed phase message"},"quotaStatuses":{"$ref":"#/components/schemas/NodePoolsQuotaStatuses"}}},"NodePoolsQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolQuotaStatus"},"description":"The current quota status for each node pool. Supported only for cluster versions 2.15+ or higher."},"NodePoolQuotaStatus":{"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to."},"allocated":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"requested":{"$ref":"#/components/schemas/QuotaStatusResourceList"}}},"QuotaStatusResourceList":{"properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in Mib (allocated/requested/...)."}}}}},"paths":{"/v1/k8s/clusters/{clusterId}/projects":{"post":{"tags":["Projects"],"deprecated":true,"operationId":"createProject","summary":"Create a new project.","description":"Creates a new project in a specific cluster. Deprecated - use `/api/v1/org-unit/projects` instead.","parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true,"description":"The Universally Unique Identifier (UUID) of the cluster."},{"in":"query","name":"excludePermissions","schema":{"type":"boolean"},"required":false,"description":"Backward compatibility of the `permissions` field. If `true`, the\n`permissions` field in the request body is ignored. If `false`,\nrelevant access rules for the `permissions` field are created in the project scope.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreateRequest"}}}},"responses":{"200":{"description":"Project created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project2"}}}},"400":{"description":"Bad Project request."},"409":{"description":"Project creation failed."}}}}}}
```

## List details of a specific project.

> Retrieves the details of a specific project from a specific cluster. Use for project analysis. \*\*Requires \`view\` permissions to the queried project\*\*. Deprecated - use \`/api/v1/org-unit/projects/{projectId}\` instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Project2":{"allOf":[{"properties":{"name":{"type":"string","description":"Project name."},"nodePoolsResources":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolAssignedResources"},"description":"Resources assigned to this Project per Node Pool."},"namespace":{"type":"string","description":"The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher."},"id":{"type":"integer","format":"int32","description":"Project id.","readOnly":true},"departmentId":{"type":"integer","format":"int32","description":"ID of the department that owns the project."},"tenantId":{"type":"integer","format":"int32","description":"ID of the tenant where the project is located."},"clusterUuid":{"type":"string","format":"uuid","description":"ID of the cluster where the project is located."},"departmentName":{"type":"string","description":"Name of the department where the project is located."},"interactiveNodeAffinity":{"type":"string"},"trainNodeAffinity":{"type":"string"},"createdAt":{"type":"string","description":"Creation date of the project.","format":"date-time"},"status":{"$ref":"#/components/schemas/ProjectStatus1"},"phase":{"type":"string","description":"project's phase"}}},{"$ref":"#/components/schemas/ProjectCommonFields"}]},"NodePoolAssignedResources":{"required":["id"],"allOf":[{"properties":{"id":{"description":"The id of the assigned resources. Required in PUT when updating the assigned resources.","type":"number"}}},{"$ref":"#/components/schemas/NodePoolAssignedResourcesCreate"}]},"NodePoolAssignedResourcesCreate":{"required":["nodePool"],"properties":{"nodePool":{"allOf":[{"$ref":"#/components/schemas/NodePoolResources"}],"description":"The node pool which the assigned resources refer to."},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of GPUs assigned in the node pool."},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."}}},"NodePoolResources":{"required":["id"],"properties":{"id":{"type":"number","description":"Node pool id."},"name":{"type":"string","description":"Node pool name."}}},"Resource1":{"properties":{"deserved":{"type":"number","description":"The amount of resources guaranteed to be allocated in case the cluster has those resources."},"maxAllowed":{"type":"number","description":"Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use \"-1\" for unlimited over quota."},"overQuotaWeight":{"type":"number","description":"The priority for over quota resources."}}},"ProjectStatus1":{"properties":{"namespace":{"type":"string","description":"The namespace of the project"},"message":{"type":"string","description":"Detailed phase message"},"quotaStatuses":{"$ref":"#/components/schemas/NodePoolsQuotaStatuses"}}},"NodePoolsQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolQuotaStatus"},"description":"The current quota status for each node pool. Supported only for cluster versions 2.15+ or higher."},"NodePoolQuotaStatus":{"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to."},"allocated":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"requested":{"$ref":"#/components/schemas/QuotaStatusResourceList"}}},"QuotaStatusResourceList":{"properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in Mib (allocated/requested/...)."}}},"ProjectCommonFields":{"properties":{"deservedGpus":{"type":"number","description":"Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.","deprecated":true},"maxAllowedGpus":{"type":"number","description":"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).","deprecated":true},"gpuOverQuotaWeight":{"type":"number","description":"Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.","maximum":3,"minimum":0,"deprecated":true},"defaultNodePools":{"type":"array","description":"Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.","items":{"type":"string"}},"interactiveJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of interactive jobs from this project."},"interactiveJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive job can be idle before being terminated."},"interactivePreemptibleJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated."},"trainingJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12"},"trainingJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that a training job can be idle before being terminated."},"nodeAffinity":{"allOf":[{"$ref":"#/components/schemas/JobsNodeAffinity"}],"description":"Node affinity configuration for jobs in the project."},"permissions":{"allOf":[{"$ref":"#/components/schemas/ResourcePermissions"}],"description":"Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.","deprecated":true},"resources":{"allOf":[{"$ref":"#/components/schemas/AssignedResources"}],"deprecated":true,"description":"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."}}},"JobsNodeAffinity":{"properties":{"train":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for training jobs."},"interactive":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for interactive jobs."}}},"NodeAffinity":{"properties":{"affinityType":{"type":"string","enum":["no_limit","only_selected"],"description":"The type of affinity of the jobs on the nodes."},"selectedTypes":{"type":"array","items":{"$ref":"#/components/schemas/NodeTypeForProject"}}}},"NodeTypeForProject":{"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"ResourcePermissions":{"properties":{"users":{"type":"array","items":{"type":"string"},"description":"Names of users that have permissions to the project."},"groups":{"type":"array","items":{"type":"string"},"description":"Names of groups that have permissions to the project."},"applications":{"type":"array","items":{"type":"string"},"description":"Names of applications that have permissions to the project."}}},"AssignedResources":{"properties":{"id":{"type":"number"},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"GPU number assigned"},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."}}}}},"paths":{"/v1/k8s/clusters/{clusterId}/projects/{id}":{"get":{"tags":["Projects"],"deprecated":true,"summary":"List details of a specific project.","operationId":"getProject","description":"Retrieves the details of a specific project from a specific cluster. Use for project analysis. **Requires `view` permissions to the queried project**. Deprecated - use `/api/v1/org-unit/projects/{projectId}` instead.","parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true,"description":"The Universally Unique Identifier (UUID) of the cluster."},{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The unique project-id identifying the project."},{"in":"query","name":"excludePermissions","schema":{"type":"boolean"},"required":false,"description":"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."}],"responses":{"200":{"description":"Successfully retrieved project details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project2"}}}},"404":{"description":"Project not found."}}}}}}
```

## Update a project.

> Updates a project's details in a specific cluster. For example, node pool resources, and others. Deprecated - use \`/api/v1/org-unit/projects/{projectId}\` instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ProjectUpdateRequest1":{"allOf":[{"properties":{"nodePoolsResources":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolAssignedResources"},"description":"Resources assigned to this Project per Node Pool."}}},{"$ref":"#/components/schemas/ProjectCommonFields"}]},"NodePoolAssignedResources":{"required":["id"],"allOf":[{"properties":{"id":{"description":"The id of the assigned resources. Required in PUT when updating the assigned resources.","type":"number"}}},{"$ref":"#/components/schemas/NodePoolAssignedResourcesCreate"}]},"NodePoolAssignedResourcesCreate":{"required":["nodePool"],"properties":{"nodePool":{"allOf":[{"$ref":"#/components/schemas/NodePoolResources"}],"description":"The node pool which the assigned resources refer to."},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of GPUs assigned in the node pool."},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."}}},"NodePoolResources":{"required":["id"],"properties":{"id":{"type":"number","description":"Node pool id."},"name":{"type":"string","description":"Node pool name."}}},"Resource1":{"properties":{"deserved":{"type":"number","description":"The amount of resources guaranteed to be allocated in case the cluster has those resources."},"maxAllowed":{"type":"number","description":"Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use \"-1\" for unlimited over quota."},"overQuotaWeight":{"type":"number","description":"The priority for over quota resources."}}},"ProjectCommonFields":{"properties":{"deservedGpus":{"type":"number","description":"Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.","deprecated":true},"maxAllowedGpus":{"type":"number","description":"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).","deprecated":true},"gpuOverQuotaWeight":{"type":"number","description":"Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.","maximum":3,"minimum":0,"deprecated":true},"defaultNodePools":{"type":"array","description":"Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.","items":{"type":"string"}},"interactiveJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of interactive jobs from this project."},"interactiveJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive job can be idle before being terminated."},"interactivePreemptibleJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated."},"trainingJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12"},"trainingJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that a training job can be idle before being terminated."},"nodeAffinity":{"allOf":[{"$ref":"#/components/schemas/JobsNodeAffinity"}],"description":"Node affinity configuration for jobs in the project."},"permissions":{"allOf":[{"$ref":"#/components/schemas/ResourcePermissions"}],"description":"Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.","deprecated":true},"resources":{"allOf":[{"$ref":"#/components/schemas/AssignedResources"}],"deprecated":true,"description":"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."}}},"JobsNodeAffinity":{"properties":{"train":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for training jobs."},"interactive":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for interactive jobs."}}},"NodeAffinity":{"properties":{"affinityType":{"type":"string","enum":["no_limit","only_selected"],"description":"The type of affinity of the jobs on the nodes."},"selectedTypes":{"type":"array","items":{"$ref":"#/components/schemas/NodeTypeForProject"}}}},"NodeTypeForProject":{"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"ResourcePermissions":{"properties":{"users":{"type":"array","items":{"type":"string"},"description":"Names of users that have permissions to the project."},"groups":{"type":"array","items":{"type":"string"},"description":"Names of groups that have permissions to the project."},"applications":{"type":"array","items":{"type":"string"},"description":"Names of applications that have permissions to the project."}}},"AssignedResources":{"properties":{"id":{"type":"number"},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"GPU number assigned"},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."}}},"Project2":{"allOf":[{"properties":{"name":{"type":"string","description":"Project name."},"nodePoolsResources":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolAssignedResources"},"description":"Resources assigned to this Project per Node Pool."},"namespace":{"type":"string","description":"The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher."},"id":{"type":"integer","format":"int32","description":"Project id.","readOnly":true},"departmentId":{"type":"integer","format":"int32","description":"ID of the department that owns the project."},"tenantId":{"type":"integer","format":"int32","description":"ID of the tenant where the project is located."},"clusterUuid":{"type":"string","format":"uuid","description":"ID of the cluster where the project is located."},"departmentName":{"type":"string","description":"Name of the department where the project is located."},"interactiveNodeAffinity":{"type":"string"},"trainNodeAffinity":{"type":"string"},"createdAt":{"type":"string","description":"Creation date of the project.","format":"date-time"},"status":{"$ref":"#/components/schemas/ProjectStatus1"},"phase":{"type":"string","description":"project's phase"}}},{"$ref":"#/components/schemas/ProjectCommonFields"}]},"ProjectStatus1":{"properties":{"namespace":{"type":"string","description":"The namespace of the project"},"message":{"type":"string","description":"Detailed phase message"},"quotaStatuses":{"$ref":"#/components/schemas/NodePoolsQuotaStatuses"}}},"NodePoolsQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolQuotaStatus"},"description":"The current quota status for each node pool. Supported only for cluster versions 2.15+ or higher."},"NodePoolQuotaStatus":{"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to."},"allocated":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"requested":{"$ref":"#/components/schemas/QuotaStatusResourceList"}}},"QuotaStatusResourceList":{"properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in Mib (allocated/requested/...)."}}}}},"paths":{"/v1/k8s/clusters/{clusterId}/projects/{id}":{"put":{"tags":["Projects"],"deprecated":true,"summary":"Update a project.","operationId":"updateProject","description":"Updates a project's details in a specific cluster. For example, node pool resources, and others. Deprecated - use `/api/v1/org-unit/projects/{projectId}` instead.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The unique project-id."},{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true,"description":"The Universally Unique Identifier (UUID) of the cluster."},{"in":"query","name":"excludePermissions","schema":{"type":"boolean"},"required":false,"description":"Backward compatibility of the `permissions` field. If `true`, the\n`permissions` field in the returned projects is not set. If `false`,\nthe `permissions` field is set in the returned projects.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdateRequest1"}}}},"responses":{"200":{"description":"An updated project details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project2"}}}},"400":{"description":"Bad project request."},"404":{"description":"Project not found."},"409":{"description":"Could not update the project."}}}}}}
```

## Delete a project.

> Deletes a project from a specific cluster. Deprecated - use \`/api/v1/org-unit/projects/{projectId}\` instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Projects","description":"Projects implement resource allocation policies and create segregation between \ndifferent initiatives. It can represent a team, an individual, or an initiative that \nshares resources or has a specific resources budget (quota). \nSee [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) \nfor more information.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Project2":{"allOf":[{"properties":{"name":{"type":"string","description":"Project name."},"nodePoolsResources":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolAssignedResources"},"description":"Resources assigned to this Project per Node Pool."},"namespace":{"type":"string","description":"The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher."},"id":{"type":"integer","format":"int32","description":"Project id.","readOnly":true},"departmentId":{"type":"integer","format":"int32","description":"ID of the department that owns the project."},"tenantId":{"type":"integer","format":"int32","description":"ID of the tenant where the project is located."},"clusterUuid":{"type":"string","format":"uuid","description":"ID of the cluster where the project is located."},"departmentName":{"type":"string","description":"Name of the department where the project is located."},"interactiveNodeAffinity":{"type":"string"},"trainNodeAffinity":{"type":"string"},"createdAt":{"type":"string","description":"Creation date of the project.","format":"date-time"},"status":{"$ref":"#/components/schemas/ProjectStatus1"},"phase":{"type":"string","description":"project's phase"}}},{"$ref":"#/components/schemas/ProjectCommonFields"}]},"NodePoolAssignedResources":{"required":["id"],"allOf":[{"properties":{"id":{"description":"The id of the assigned resources. Required in PUT when updating the assigned resources.","type":"number"}}},{"$ref":"#/components/schemas/NodePoolAssignedResourcesCreate"}]},"NodePoolAssignedResourcesCreate":{"required":["nodePool"],"properties":{"nodePool":{"allOf":[{"$ref":"#/components/schemas/NodePoolResources"}],"description":"The node pool which the assigned resources refer to."},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of GPUs assigned in the node pool."},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled."}}},"NodePoolResources":{"required":["id"],"properties":{"id":{"type":"number","description":"Node pool id."},"name":{"type":"string","description":"Node pool name."}}},"Resource1":{"properties":{"deserved":{"type":"number","description":"The amount of resources guaranteed to be allocated in case the cluster has those resources."},"maxAllowed":{"type":"number","description":"Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use \"-1\" for unlimited over quota."},"overQuotaWeight":{"type":"number","description":"The priority for over quota resources."}}},"ProjectStatus1":{"properties":{"namespace":{"type":"string","description":"The namespace of the project"},"message":{"type":"string","description":"Detailed phase message"},"quotaStatuses":{"$ref":"#/components/schemas/NodePoolsQuotaStatuses"}}},"NodePoolsQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/NodePoolQuotaStatus"},"description":"The current quota status for each node pool. Supported only for cluster versions 2.15+ or higher."},"NodePoolQuotaStatus":{"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to."},"allocated":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResourceList"},"requested":{"$ref":"#/components/schemas/QuotaStatusResourceList"}}},"QuotaStatusResourceList":{"properties":{"gpu":{"type":"number","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","description":"Memory in Mib (allocated/requested/...)."}}},"ProjectCommonFields":{"properties":{"deservedGpus":{"type":"number","description":"Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.","deprecated":true},"maxAllowedGpus":{"type":"number","description":"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).","deprecated":true},"gpuOverQuotaWeight":{"type":"number","description":"Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.","maximum":3,"minimum":0,"deprecated":true},"defaultNodePools":{"type":"array","description":"Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.","items":{"type":"string"}},"interactiveJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of interactive jobs from this project."},"interactiveJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive job can be idle before being terminated."},"interactivePreemptibleJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated."},"trainingJobTimeLimitSecs":{"type":"number","description":"A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12"},"trainingJobMaxIdleDurationSecs":{"type":"number","description":"Maximum duration (in seconds) that a training job can be idle before being terminated."},"nodeAffinity":{"allOf":[{"$ref":"#/components/schemas/JobsNodeAffinity"}],"description":"Node affinity configuration for jobs in the project."},"permissions":{"allOf":[{"$ref":"#/components/schemas/ResourcePermissions"}],"description":"Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.","deprecated":true},"resources":{"allOf":[{"$ref":"#/components/schemas/AssignedResources"}],"deprecated":true,"description":"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."}}},"JobsNodeAffinity":{"properties":{"train":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for training jobs."},"interactive":{"allOf":[{"$ref":"#/components/schemas/NodeAffinity"}],"description":"Node affinity configuration for interactive jobs."}}},"NodeAffinity":{"properties":{"affinityType":{"type":"string","enum":["no_limit","only_selected"],"description":"The type of affinity of the jobs on the nodes."},"selectedTypes":{"type":"array","items":{"$ref":"#/components/schemas/NodeTypeForProject"}}}},"NodeTypeForProject":{"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"ResourcePermissions":{"properties":{"users":{"type":"array","items":{"type":"string"},"description":"Names of users that have permissions to the project."},"groups":{"type":"array","items":{"type":"string"},"description":"Names of groups that have permissions to the project."},"applications":{"type":"array","items":{"type":"string"},"description":"Names of applications that have permissions to the project."}}},"AssignedResources":{"properties":{"id":{"type":"number"},"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"GPU number assigned"},"cpu":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."},"memory":{"allOf":[{"$ref":"#/components/schemas/Resource1"}],"description":"CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled."}}}}},"paths":{"/v1/k8s/clusters/{clusterId}/projects/{id}":{"delete":{"tags":["Projects"],"deprecated":true,"summary":"Delete a project.","operationId":"deleteProject","description":"Deletes a project from a specific cluster. Deprecated - use `/api/v1/org-unit/projects/{projectId}` instead.","parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true,"description":"The Universally Unique Identifier (UUID) of the cluster."},{"in":"path","name":"id","schema":{"type":"integer"},"required":true,"description":"The unique id of the project."}],"responses":{"200":{"description":"Project deleted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project2"}}}},"404":{"description":"Project not found."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-ai-docs.nvidia.com/api/2.19/organizations/projects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
