Skip to content

Create a Persistent Volume

POST
/api/v1/persistent_volume/{cluster_id}/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/persistent_volume/{cluster_id}/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "my-pv-10gb",
"pv_size": 10
}'

Creates a persistent volume (PV) on the cluster. Send a name and pv_size (in GB, matching one of the PV Plans sizes). The path takes the cluster_id (from List / Detail, not the service_id).

cluster_id
required
integer

The cluster_id of the cluster (from List / Detail).

Example

10001
project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used to authenticate the request.

Example

<API_KEY>
location
required
string

Region of the cluster.

Example

<LOCATION>
Media typeapplication/json

Create a persistent volume on the cluster.

object
name
required

Display name of the persistent volume.

string

Example

my-pv-10gb
pv_size
required

Size of the volume in GB. Must match one of the sizes returned by PV Plans.

integer

Example

10

Example

{
"name": "my-pv-10gb",
"pv_size": 10
}

Successful response

Media typeapplication/json
object
code
integer
data
object
pv_id
integer
pv_name
string
errors
object
message
string

Example

{
"code": 200,
"data": {
"pv_id": 15996,
"pv_name": "my-pv-10gb"
},
"message": "persistent volume created successfully"
}