# Datavolumes

## List datavolumes in permitted scopes

> Get requested datavolumes.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DatavolumesRequestType":{"name":"requestType","in":"query","required":true,"description":"Which datavolumes would be returned in the response. Originated - datavolumes that are originated in the permitted scopes of the caller. UsableInProject - datavolumes that can be used in a specific project; if you use this value, you must also provide the project ID in the \"usableInProjectId\" query param.","schema":{"$ref":"#/components/schemas/DatavolumeRequestType"}},"DatavolumesUsableInProjectId":{"name":"usableInProjectId","in":"query","required":false,"description":"Only when using \"UsableInProject\" requestType; Filter results for only datavolumes that are shared with - or originated in - the project.","schema":{"type":"string"}},"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}},"DatavolumesSortBy":{"name":"sortBy","in":"query","required":false,"description":"Sort results by a parameters.","schema":{"type":"string","enum":["name","projectId","clusterId","departmentId","projectName","createdAt","createdBy","phase"]}},"SortOrder":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"DatavolumesFilter":{"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|projectId|clusterId|departmentId|projectName|createdAt|createdBy|phase)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"Search":{"name":"search","in":"query","required":false,"description":"Filter results by a free text search.","schema":{"type":"string"}}},"schemas":{"DatavolumeRequestType":{"type":"string","description":"Which datavolumes to return in the GET datavolumes response. Originated - datavolumes that are originated in the permitted scopes of the caller. UsableInProject - datavolumes that can be used in a specific project; if you use this value, you must also provide the project ID in the \"usableInProjectId\" query param.","enum":["Originated","UsableInProject"]},"DatavolumesNoSharedScopes":{"type":"array","items":{"$ref":"#/components/schemas/DatavolumeNoSharedScopes"}},"DatavolumeNoSharedScopes":{"allOf":[{"$ref":"#/components/schemas/DatavolumeInnerFields"},{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/DatavolumeStatus"}}}]},"DatavolumeInnerFields":{"allOf":[{"$ref":"#/components/schemas/BaseFields"},{"$ref":"#/components/schemas/DatavolumeCreationFields"},{"$ref":"#/components/schemas/EnrichmentDataFields1"}]},"BaseFields":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"DatavolumeCreationFields":{"type":"object","required":["name","projectId","originPvcName"],"properties":{"name":{"type":"string","maxLength":63,"pattern":"^[a-z][-a-z0-9]{0,62}$","description":"The name of the new data volume."},"description":{"type":"string","maxLength":127,"description":"A brief description of the data volume and its purpose."},"originPvcName":{"description":"The name of the existing PVC that the new data volume is based on.","type":"string"},"projectId":{"description":"The ID of the project whose namespace contains the origin PVC.","type":"string"},"shouldDeleteOriginalVolume":{"description":"True is not supported. This parameter will be removed in a future release.","type":"boolean","default":false},"useOriginalVolume":{"description":"If true, the original storage volume will be used together with the data volume. Default true as long as \"shouldDeleteOriginalVolume\" is false.","type":"boolean","default":true,"nullable":true}}},"EnrichmentDataFields1":{"type":"object","required":["projectName"],"properties":{"projectName":{"type":"string"},"departmentId":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"DatavolumeStatus":{"type":"object","required":["phase"],"properties":{"phase":{"$ref":"#/components/schemas/DatavolumePhase"},"phaseMessage":{"type":"string","description":"Message explaining the phase of the Datavolume in the cluster"},"conditions":{"$ref":"#/components/schemas/Conditions1"},"datavolumePvcName":{"type":"string","description":"The name of the copied PVC that is created in the cluster in the project namespace"},"datavolumePvName":{"type":"string","description":"The name of the PV that is created in the cluster - copied from the one that was attached to the original pvc"}}},"DatavolumePhase":{"type":"string","description":"Phase of the Datavolume in the cluster","enum":["Ready","NotReady","Creating","Deleting","Unknown"]},"Conditions1":{"type":"array","items":{"$ref":"#/components/schemas/Condition2"}},"Condition2":{"type":"object","required":["type","status"],"properties":{"type":{"description":"The type of the condition, such as Failed or Available. See Types of domain status conditions.","type":"string"},"status":{"type":"string","description":"The status of the condition, such as True, False or Unknown."},"message":{"type":"string","description":"An optional, human-readable message providing more details about the condition."},"reason":{"type":"string","description":"The reason for the Failed condition. Not applicable to other types of condition."},"lastTransitionTime":{"description":"A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.","type":"string","nullable":true,"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"}}}},"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":{"/api/v1/datavolumes":{"get":{"summary":"List datavolumes in permitted scopes","description":"Get requested datavolumes.","operationId":"get_datavolumes","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DatavolumesRequestType"},{"$ref":"#/components/parameters/DatavolumesUsableInProjectId"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/DatavolumesSortBy"},{"$ref":"#/components/parameters/SortOrder"},{"$ref":"#/components/parameters/DatavolumesFilter"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["datavolumes"],"properties":{"next":{"type":"integer"},"datavolumes":{"$ref":"#/components/schemas/DatavolumesNoSharedScopes"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## POST /api/v1/datavolumes

> Create a datavolume

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"DatavolumeCreationFields":{"type":"object","required":["name","projectId","originPvcName"],"properties":{"name":{"type":"string","maxLength":63,"pattern":"^[a-z][-a-z0-9]{0,62}$","description":"The name of the new data volume."},"description":{"type":"string","maxLength":127,"description":"A brief description of the data volume and its purpose."},"originPvcName":{"description":"The name of the existing PVC that the new data volume is based on.","type":"string"},"projectId":{"description":"The ID of the project whose namespace contains the origin PVC.","type":"string"},"shouldDeleteOriginalVolume":{"description":"True is not supported. This parameter will be removed in a future release.","type":"boolean","default":false},"useOriginalVolume":{"description":"If true, the original storage volume will be used together with the data volume. Default true as long as \"shouldDeleteOriginalVolume\" is false.","type":"boolean","default":true,"nullable":true}}},"Datavolume":{"allOf":[{"$ref":"#/components/schemas/DatavolumeInnerFields"},{"type":"object","required":["status"],"properties":{"sharedScopes":{"description":"Will be returned only if the user has the required permissions to view those scopes","type":"array","items":{"$ref":"#/components/schemas/SharedScope"}},"status":{"$ref":"#/components/schemas/DatavolumeStatus"}}}]},"DatavolumeInnerFields":{"allOf":[{"$ref":"#/components/schemas/BaseFields"},{"$ref":"#/components/schemas/DatavolumeCreationFields"},{"$ref":"#/components/schemas/EnrichmentDataFields1"}]},"BaseFields":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"EnrichmentDataFields1":{"type":"object","required":["projectName"],"properties":{"projectName":{"type":"string"},"departmentId":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"SharedScope":{"allOf":[{"$ref":"#/components/schemas/SharedScopeBase"},{"type":"object","required":["scopeName"],"properties":{"scopeName":{"type":"string","description":"The name of the scope"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}}]},"SharedScopeBase":{"type":"object","required":["scopeType","scopeId"],"properties":{"scopeType":{"$ref":"#/components/schemas/ScopeType2"},"scopeId":{"type":"string"}}},"ScopeType2":{"type":"string","enum":["cluster","department","project"]},"DatavolumeStatus":{"type":"object","required":["phase"],"properties":{"phase":{"$ref":"#/components/schemas/DatavolumePhase"},"phaseMessage":{"type":"string","description":"Message explaining the phase of the Datavolume in the cluster"},"conditions":{"$ref":"#/components/schemas/Conditions1"},"datavolumePvcName":{"type":"string","description":"The name of the copied PVC that is created in the cluster in the project namespace"},"datavolumePvName":{"type":"string","description":"The name of the PV that is created in the cluster - copied from the one that was attached to the original pvc"}}},"DatavolumePhase":{"type":"string","description":"Phase of the Datavolume in the cluster","enum":["Ready","NotReady","Creating","Deleting","Unknown"]},"Conditions1":{"type":"array","items":{"$ref":"#/components/schemas/Condition2"}},"Condition2":{"type":"object","required":["type","status"],"properties":{"type":{"description":"The type of the condition, such as Failed or Available. See Types of domain status conditions.","type":"string"},"status":{"type":"string","description":"The status of the condition, such as True, False or Unknown."},"message":{"type":"string","description":"An optional, human-readable message providing more details about the condition."},"reason":{"type":"string","description":"The reason for the Failed condition. Not applicable to other types of condition."},"lastTransitionTime":{"description":"A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.","type":"string","nullable":true,"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"}}}},"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":{"/api/v1/datavolumes":{"post":{"summary":"Create a datavolume","operationId":"create_datavolume","tags":["Datavolumes-API"],"requestBody":{"description":"The datavolume to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatavolumeCreationFields"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Datavolume"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## GET /api/v1/datavolumes/{datavolumeId}

> Get datavolume

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DatavolumeId":{"name":"datavolumeId","in":"path","required":true,"description":"The id of the datavolume to retrieve","schema":{"type":"string","format":"uuid"}}},"schemas":{"Datavolume":{"allOf":[{"$ref":"#/components/schemas/DatavolumeInnerFields"},{"type":"object","required":["status"],"properties":{"sharedScopes":{"description":"Will be returned only if the user has the required permissions to view those scopes","type":"array","items":{"$ref":"#/components/schemas/SharedScope"}},"status":{"$ref":"#/components/schemas/DatavolumeStatus"}}}]},"DatavolumeInnerFields":{"allOf":[{"$ref":"#/components/schemas/BaseFields"},{"$ref":"#/components/schemas/DatavolumeCreationFields"},{"$ref":"#/components/schemas/EnrichmentDataFields1"}]},"BaseFields":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"DatavolumeCreationFields":{"type":"object","required":["name","projectId","originPvcName"],"properties":{"name":{"type":"string","maxLength":63,"pattern":"^[a-z][-a-z0-9]{0,62}$","description":"The name of the new data volume."},"description":{"type":"string","maxLength":127,"description":"A brief description of the data volume and its purpose."},"originPvcName":{"description":"The name of the existing PVC that the new data volume is based on.","type":"string"},"projectId":{"description":"The ID of the project whose namespace contains the origin PVC.","type":"string"},"shouldDeleteOriginalVolume":{"description":"True is not supported. This parameter will be removed in a future release.","type":"boolean","default":false},"useOriginalVolume":{"description":"If true, the original storage volume will be used together with the data volume. Default true as long as \"shouldDeleteOriginalVolume\" is false.","type":"boolean","default":true,"nullable":true}}},"EnrichmentDataFields1":{"type":"object","required":["projectName"],"properties":{"projectName":{"type":"string"},"departmentId":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"SharedScope":{"allOf":[{"$ref":"#/components/schemas/SharedScopeBase"},{"type":"object","required":["scopeName"],"properties":{"scopeName":{"type":"string","description":"The name of the scope"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}}]},"SharedScopeBase":{"type":"object","required":["scopeType","scopeId"],"properties":{"scopeType":{"$ref":"#/components/schemas/ScopeType2"},"scopeId":{"type":"string"}}},"ScopeType2":{"type":"string","enum":["cluster","department","project"]},"DatavolumeStatus":{"type":"object","required":["phase"],"properties":{"phase":{"$ref":"#/components/schemas/DatavolumePhase"},"phaseMessage":{"type":"string","description":"Message explaining the phase of the Datavolume in the cluster"},"conditions":{"$ref":"#/components/schemas/Conditions1"},"datavolumePvcName":{"type":"string","description":"The name of the copied PVC that is created in the cluster in the project namespace"},"datavolumePvName":{"type":"string","description":"The name of the PV that is created in the cluster - copied from the one that was attached to the original pvc"}}},"DatavolumePhase":{"type":"string","description":"Phase of the Datavolume in the cluster","enum":["Ready","NotReady","Creating","Deleting","Unknown"]},"Conditions1":{"type":"array","items":{"$ref":"#/components/schemas/Condition2"}},"Condition2":{"type":"object","required":["type","status"],"properties":{"type":{"description":"The type of the condition, such as Failed or Available. See Types of domain status conditions.","type":"string"},"status":{"type":"string","description":"The status of the condition, such as True, False or Unknown."},"message":{"type":"string","description":"An optional, human-readable message providing more details about the condition."},"reason":{"type":"string","description":"The reason for the Failed condition. Not applicable to other types of condition."},"lastTransitionTime":{"description":"A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.","type":"string","nullable":true,"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":{"/api/v1/datavolumes/{datavolumeId}":{"get":{"summary":"Get datavolume","operationId":"get_datavolume","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DatavolumeId"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Datavolume"}}}},"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"}}}}}}
```

## DELETE /api/v1/datavolumes/{datavolumeId}

> Delete datavolume

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DatavolumeId":{"name":"datavolumeId","in":"path","required":true,"description":"The id of the datavolume to retrieve","schema":{"type":"string","format":"uuid"}}},"responses":{"202Accepted":{"description":"Accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpResponse"}}}},"204NoContent":{"description":"No Content."},"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":{"HttpResponse":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/datavolumes/{datavolumeId}":{"delete":{"summary":"Delete datavolume","operationId":"delete_datavolume","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DatavolumeId"}],"responses":{"202":{"$ref":"#/components/responses/202Accepted"},"204":{"$ref":"#/components/responses/204NoContent"},"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"}}}}}}
```

## PATCH /api/v1/datavolumes/{datavolumeId}

> Patch datavolume

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DatavolumeId":{"name":"datavolumeId","in":"path","required":true,"description":"The id of the datavolume to retrieve","schema":{"type":"string","format":"uuid"}}},"schemas":{"DatavolumePatchFields":{"type":"object","properties":{"description":{"type":"string","maxLength":127}}},"DatavolumeNoSharedScopes":{"allOf":[{"$ref":"#/components/schemas/DatavolumeInnerFields"},{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/DatavolumeStatus"}}}]},"DatavolumeInnerFields":{"allOf":[{"$ref":"#/components/schemas/BaseFields"},{"$ref":"#/components/schemas/DatavolumeCreationFields"},{"$ref":"#/components/schemas/EnrichmentDataFields1"}]},"BaseFields":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"DatavolumeCreationFields":{"type":"object","required":["name","projectId","originPvcName"],"properties":{"name":{"type":"string","maxLength":63,"pattern":"^[a-z][-a-z0-9]{0,62}$","description":"The name of the new data volume."},"description":{"type":"string","maxLength":127,"description":"A brief description of the data volume and its purpose."},"originPvcName":{"description":"The name of the existing PVC that the new data volume is based on.","type":"string"},"projectId":{"description":"The ID of the project whose namespace contains the origin PVC.","type":"string"},"shouldDeleteOriginalVolume":{"description":"True is not supported. This parameter will be removed in a future release.","type":"boolean","default":false},"useOriginalVolume":{"description":"If true, the original storage volume will be used together with the data volume. Default true as long as \"shouldDeleteOriginalVolume\" is false.","type":"boolean","default":true,"nullable":true}}},"EnrichmentDataFields1":{"type":"object","required":["projectName"],"properties":{"projectName":{"type":"string"},"departmentId":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"DatavolumeStatus":{"type":"object","required":["phase"],"properties":{"phase":{"$ref":"#/components/schemas/DatavolumePhase"},"phaseMessage":{"type":"string","description":"Message explaining the phase of the Datavolume in the cluster"},"conditions":{"$ref":"#/components/schemas/Conditions1"},"datavolumePvcName":{"type":"string","description":"The name of the copied PVC that is created in the cluster in the project namespace"},"datavolumePvName":{"type":"string","description":"The name of the PV that is created in the cluster - copied from the one that was attached to the original pvc"}}},"DatavolumePhase":{"type":"string","description":"Phase of the Datavolume in the cluster","enum":["Ready","NotReady","Creating","Deleting","Unknown"]},"Conditions1":{"type":"array","items":{"$ref":"#/components/schemas/Condition2"}},"Condition2":{"type":"object","required":["type","status"],"properties":{"type":{"description":"The type of the condition, such as Failed or Available. See Types of domain status conditions.","type":"string"},"status":{"type":"string","description":"The status of the condition, such as True, False or Unknown."},"message":{"type":"string","description":"An optional, human-readable message providing more details about the condition."},"reason":{"type":"string","description":"The reason for the Failed condition. Not applicable to other types of condition."},"lastTransitionTime":{"description":"A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.","type":"string","nullable":true,"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"}}}},"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":{"/api/v1/datavolumes/{datavolumeId}":{"patch":{"summary":"Patch datavolume","operationId":"patch_datavolume","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DatavolumeId"}],"requestBody":{"description":"Datavolume to update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatavolumePatchFields"}}}},"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatavolumeNoSharedScopes"}}}},"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"}}}}}}
```

## Data volumes name availability.

> Checks if a specified data volume name is available under the given scope (e.g., project or department). Returns a 204 No Content response if the name is available, or 409 Conflict if the name is already in use.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DataVolumeName":{"name":"dataName","in":"query","required":true,"description":"the name of the datavolume","schema":{"type":"string","minLength":1}},"ClusterIdRequired":{"name":"clusterId","in":"query","description":"The id of the cluster","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409Conflict":{"description":"The specified resource already exists","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/datavolumes/name-availability":{"get":{"summary":"Data volumes name availability.","description":"Checks if a specified data volume name is available under the given scope (e.g., project or department). Returns a 204 No Content response if the name is available, or 409 Conflict if the name is already in use.","operationId":"datavolume_name_availability","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DataVolumeName"},{"$ref":"#/components/parameters/ClusterIdRequired"}],"responses":{"204":{"description":"The name is available to use"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"409":{"$ref":"#/components/responses/409Conflict"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Count data volumes.

> Retrieve the number of data volumes.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DatavolumesRequestType":{"name":"requestType","in":"query","required":true,"description":"Which datavolumes would be returned in the response. Originated - datavolumes that are originated in the permitted scopes of the caller. UsableInProject - datavolumes that can be used in a specific project; if you use this value, you must also provide the project ID in the \"usableInProjectId\" query param.","schema":{"$ref":"#/components/schemas/DatavolumeRequestType"}},"DatavolumesUsableInProjectId":{"name":"usableInProjectId","in":"query","required":false,"description":"Only when using \"UsableInProject\" requestType; Filter results for only datavolumes that are shared with - or originated in - the project.","schema":{"type":"string"}},"DatavolumesFilter":{"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|projectId|clusterId|departmentId|projectName|createdAt|createdBy|phase)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"Search":{"name":"search","in":"query","required":false,"description":"Filter results by a free text search.","schema":{"type":"string"}}},"schemas":{"DatavolumeRequestType":{"type":"string","description":"Which datavolumes to return in the GET datavolumes response. Originated - datavolumes that are originated in the permitted scopes of the caller. UsableInProject - datavolumes that can be used in a specific project; if you use this value, you must also provide the project ID in the \"usableInProjectId\" query param.","enum":["Originated","UsableInProject"]},"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"}}}},"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":{"/api/v1/datavolumes/count":{"get":{"summary":"Count data volumes.","description":"Retrieve the number of data volumes.","operationId":"count_datavolumes","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DatavolumesRequestType"},{"$ref":"#/components/parameters/DatavolumesUsableInProjectId"},{"$ref":"#/components/parameters/DatavolumesFilter"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"Executed successfully.","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"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## GET /api/v1/datavolumes/{datavolumeId}/sharedScopes

> Get the datavolume's shared scopes

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DatavolumeId":{"name":"datavolumeId","in":"path","required":true,"description":"The id of the datavolume to retrieve","schema":{"type":"string","format":"uuid"}}},"schemas":{"SharedScopes":{"type":"array","items":{"$ref":"#/components/schemas/SharedScope"}},"SharedScope":{"allOf":[{"$ref":"#/components/schemas/SharedScopeBase"},{"type":"object","required":["scopeName"],"properties":{"scopeName":{"type":"string","description":"The name of the scope"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}}]},"SharedScopeBase":{"type":"object","required":["scopeType","scopeId"],"properties":{"scopeType":{"$ref":"#/components/schemas/ScopeType2"},"scopeId":{"type":"string"}}},"ScopeType2":{"type":"string","enum":["cluster","department","project"]},"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":{"/api/v1/datavolumes/{datavolumeId}/sharedScopes":{"get":{"summary":"Get the datavolume's shared scopes","operationId":"get_datavolume_shared_scopes","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DatavolumeId"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedScopes"}}}},"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"}}}}}}
```

## PATCH /api/v1/datavolumes/{datavolumeId}/sharedScopes

> Patch the datavolume's shared scopes

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Datavolumes-API"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DatavolumeId":{"name":"datavolumeId","in":"path","required":true,"description":"The id of the datavolume to retrieve","schema":{"type":"string","format":"uuid"}}},"schemas":{"SharedScopesPatchRequest":{"type":"object","properties":{"add":{"type":"array","items":{"$ref":"#/components/schemas/SharedScopeBase"},"maxLength":50},"remove":{"type":"array","items":{"$ref":"#/components/schemas/SharedScopeBase"},"maxLength":50}}},"SharedScopeBase":{"type":"object","required":["scopeType","scopeId"],"properties":{"scopeType":{"$ref":"#/components/schemas/ScopeType2"},"scopeId":{"type":"string"}}},"ScopeType2":{"type":"string","enum":["cluster","department","project"]},"SharedScopes":{"type":"array","items":{"$ref":"#/components/schemas/SharedScope"}},"SharedScope":{"allOf":[{"$ref":"#/components/schemas/SharedScopeBase"},{"type":"object","required":["scopeName"],"properties":{"scopeName":{"type":"string","description":"The name of the scope"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}}]},"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"}}}},"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":{"/api/v1/datavolumes/{datavolumeId}/sharedScopes":{"patch":{"summary":"Patch the datavolume's shared scopes","operationId":"patch_datavolume_shared_scopes","tags":["Datavolumes-API"],"parameters":[{"$ref":"#/components/parameters/DatavolumeId"}],"requestBody":{"description":"Requested SharedScopes of the datavolume to patch.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedScopesPatchRequest"}}}},"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedScopes"}}}},"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"}}}}}}
```


---

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