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}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/persistent_volume/{cluster_id}/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "name": "my-pv-10gb", "pv_size": 10, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/persistent_volume/{cluster_id}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "name": "my-pv-10gb", "pv_size": 10 }),});console.log(await response.json());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).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”cluster_id
required
integer
The cluster_id of the cluster (from List / Detail).
Example
10001Query Parameters
Section titled “Query Parameters”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>Request Body
Section titled “Request Body”Media typeapplication/json
Create a persistent volume on the cluster.
object
name
required
Display name of the persistent volume.
string
Example
my-pv-10gbpv_size
required
Size of the volume in GB. Must match one of the sizes returned by PV Plans.
integer
Example
10Example
{ "name": "my-pv-10gb", "pv_size": 10}Responses
Section titled “Responses”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"}