Datavolumes

List datavolumes in permitted scopes

Get requested datavolumes.

SecuritybearerAuth
Request
query Parameters
requestType
required
string (DatavolumeRequestType)

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.

Enum: "Originated" "UsableInProject"
Example: requestType=Originated
usableInProjectId
string

Only when using "UsableInProject" requestType; Filter results for only datavolumes that are shared with - or originated in - the project.

Example: usableInProjectId=5
offset
integer <int32>

The offset of the first item returned in the collection.

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

The maximum number of entries to return.

sortBy
string

Sort results by a parameters.

Enum: "name" "projectId" "clusterId" "departmentId" "projectName" "createdAt" "createdBy" "phase"
sortOrder
string
Default: "asc"

Sort results in descending or ascending order.

Enum: "asc" "desc"
filterBy
Array of strings

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: filterBy=name!=some-datavolume-name
Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

get/api/v1/datavolumes
Response samples
application/json
{
  • "next": 1,
  • "datavolumes": [
    ]
}

Create a datavolume

SecuritybearerAuth
Request
Request Body schema: application/json
required

The datavolume to create.

name
required
string <= 63 characters ^[a-z][-a-z0-9]{0,62}$
description
string <= 127 characters
originPvcName
required
string

The name of the PVC that the datavolume is based on

projectId
required
string

The ID of the project that in its namespace the origin pvc is located

shouldDeleteOriginalVolume
boolean
Default: false

If true, the original storage volume will be deleted together with the datavolume

Responses
201

Created

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

post/api/v1/datavolumes
Request samples
application/json
{
  • "name": "datavolume-a",
  • "description": "Results of experiment X",
  • "originPvcName": "pvc-a",
  • "projectId": "5",
  • "shouldDeleteOriginalVolume": false
}
Response samples
application/json
{
  • "id": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "user@run.ai",
  • "updatedBy": "user@run.ai",
  • "name": "datavolume-a",
  • "description": "Results of experiment X",
  • "originPvcName": "pvc-a",
  • "projectId": "5",
  • "shouldDeleteOriginalVolume": false,
  • "projectName": "project-a",
  • "departmentId": "department-a",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "sharedScopes": [
    ],
  • "status": {
    }
}

Get datavolume

SecuritybearerAuth
Request
path Parameters
datavolumeId
required
string <uuid>

The id of the datavolume to retrieve

Example: 71f69d83-ba66-4822-adf5-55ce55efd210
Responses
200

Executed successfully.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/api/v1/datavolumes/{datavolumeId}
Response samples
application/json
{
  • "id": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "user@run.ai",
  • "updatedBy": "user@run.ai",
  • "name": "datavolume-a",
  • "description": "Results of experiment X",
  • "originPvcName": "pvc-a",
  • "projectId": "5",
  • "shouldDeleteOriginalVolume": false,
  • "projectName": "project-a",
  • "departmentId": "department-a",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "sharedScopes": [
    ],
  • "status": {
    }
}

Delete datavolume

SecuritybearerAuth
Request
path Parameters
datavolumeId
required
string <uuid>

The id of the datavolume to retrieve

Example: 71f69d83-ba66-4822-adf5-55ce55efd210
Responses
202

Accepted.

204

No Content.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

delete/api/v1/datavolumes/{datavolumeId}
Response samples
application/json
{
  • "code": 202,
  • "message": "Request has been accepted."
}

Patch datavolume

SecuritybearerAuth
Request
path Parameters
datavolumeId
required
string <uuid>

The id of the datavolume to retrieve

Example: 71f69d83-ba66-4822-adf5-55ce55efd210
Request Body schema: application/json
required

Datavolume to update.

description
string <= 127 characters
Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

patch/api/v1/datavolumes/{datavolumeId}
Request samples
application/json
{
  • "description": "Results of experiment X"
}
Response samples
application/json
{
  • "id": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "user@run.ai",
  • "updatedBy": "user@run.ai",
  • "name": "datavolume-a",
  • "description": "Results of experiment X",
  • "originPvcName": "pvc-a",
  • "projectId": "5",
  • "shouldDeleteOriginalVolume": false,
  • "projectName": "project-a",
  • "departmentId": "department-a",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "status": {
    }
}

Patch the datavolume's shared scopes

SecuritybearerAuth
Request
path Parameters
datavolumeId
required
string <uuid>

The id of the datavolume to retrieve

Example: 71f69d83-ba66-4822-adf5-55ce55efd210
Request Body schema: application/json
required

Requested SharedScopes of the datavolume to patch.

Array of objects (SharedScopeBase) <= 50 characters
Array of objects (SharedScopeBase) <= 50 characters
Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

patch/api/v1/datavolumes/{datavolumeId}/sharedScopes
Request samples
application/json
{
  • "add": [
    ],
  • "remove": [
    ]
}
Response samples
application/json
[
  • {
    }
]

Get the datavolume's shared scopes

SecuritybearerAuth
Request
path Parameters
datavolumeId
required
string <uuid>

The id of the datavolume to retrieve

Example: 71f69d83-ba66-4822-adf5-55ce55efd210
Responses
200

Executed successfully.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/api/v1/datavolumes/{datavolumeId}/sharedScopes
Response samples
application/json
[
  • {
    }
]