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
search
string

Filter results by a free text search.

Example: search=test project
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}$

The name of the new data volume.

description
string <= 127 characters

A brief description of the data volume and its purpose.

originPvcName
required
string

The name of the existing PVC that the new data volume is based on.

projectId
required
string

The ID of the project whose namespace contains the origin PVC.

shouldDeleteOriginalVolume
boolean
Default: false

True is not supported. This parameter will be removed in a future release.

useOriginalVolume
boolean or null
Default: true

If true, the original storage volume will be used together with the data volume. Default true as long as "shouldDeleteOriginalVolume" is false.

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,
  • "useOriginalVolume": true
}
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,
  • "useOriginalVolume": true,
  • "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,
  • "useOriginalVolume": true,
  • "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,
  • "useOriginalVolume": true,
  • "projectName": "project-a",
  • "departmentId": "department-a",
  • "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  • "status": {
    }
}

Data volumes name availability.

Check if a given data volume name creates naming conflicts under the given scope. Returns conflict (409) in case the name is not available, or 204 (no content) if it is ok.

SecuritybearerAuth
Request
query Parameters
dataName
required
string non-empty

the name of the datavolume

clusterId
required
string <uuid>

The id of the cluster

Example: clusterId=d73a738f-fab3-430a-8fa3-5241493d7128
Responses
204

The name is available to use

401

Unauthorized

403

Forbidden

409

The specified resource already exists

503

unexpected error

get/api/v1/datavolumes/name-availability
Response samples
application/json
{
  • "code": 401,
  • "message": "Issuer is not familiar."
}

Count data volumes.

Retrieve the number of data volumes.

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
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
search
string

Filter results by a free text search.

Example: search=test project
Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

get/api/v1/datavolumes/count
Response samples
application/json
{
  • "count": 1
}

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
[
  • {
    }
]