Skip to main content
POST
/
org
/
{org}
/
gvc
/
{gvc}
/
volumeset
Create a volumeset
curl --request POST \
  --url https://api.cpln.io/org/{org}/gvc/{gvc}/volumeset \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "tags": {},
  "spec": {
    "initialCapacity": 123,
    "storageClassSuffix": "<string>",
    "fileSystemType": "ext4",
    "customEncryption": {
      "regions": {}
    },
    "snapshots": {
      "createFinalSnapshot": true,
      "retentionDuration": "<string>",
      "schedule": "<string>"
    },
    "autoscaling": {
      "maxCapacity": 123,
      "minFreePercentage": 123,
      "scalingFactor": 123,
      "predictive": {
        "enabled": true,
        "lookbackHours": 123,
        "projectionHours": 123,
        "minDataPoints": 123,
        "minGrowthRateGBPerHour": 123,
        "scalingFactor": 123
      }
    },
    "mountOptions": {
      "resources": {
        "maxCpu": "2000m",
        "minCpu": "500m",
        "minMemory": "1Gi",
        "maxMemory": "2Gi"
      }
    }
  },
  "gvc": {}
}
'
import requests

url = "https://api.cpln.io/org/{org}/gvc/{gvc}/volumeset"

payload = {
"name": "<string>",
"description": "<string>",
"tags": {},
"spec": {
"initialCapacity": 123,
"storageClassSuffix": "<string>",
"fileSystemType": "ext4",
"customEncryption": { "regions": {} },
"snapshots": {
"createFinalSnapshot": True,
"retentionDuration": "<string>",
"schedule": "<string>"
},
"autoscaling": {
"maxCapacity": 123,
"minFreePercentage": 123,
"scalingFactor": 123,
"predictive": {
"enabled": True,
"lookbackHours": 123,
"projectionHours": 123,
"minDataPoints": 123,
"minGrowthRateGBPerHour": 123,
"scalingFactor": 123
}
},
"mountOptions": { "resources": {
"maxCpu": "2000m",
"minCpu": "500m",
"minMemory": "1Gi",
"maxMemory": "2Gi"
} }
},
"gvc": {}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
tags: {},
spec: {
initialCapacity: 123,
storageClassSuffix: '<string>',
fileSystemType: 'ext4',
customEncryption: {regions: {}},
snapshots: {createFinalSnapshot: true, retentionDuration: '<string>', schedule: '<string>'},
autoscaling: {
maxCapacity: 123,
minFreePercentage: 123,
scalingFactor: 123,
predictive: {
enabled: true,
lookbackHours: 123,
projectionHours: 123,
minDataPoints: 123,
minGrowthRateGBPerHour: 123,
scalingFactor: 123
}
},
mountOptions: {
resources: {maxCpu: '2000m', minCpu: '500m', minMemory: '1Gi', maxMemory: '2Gi'}
}
},
gvc: {}
})
};

fetch('https://api.cpln.io/org/{org}/gvc/{gvc}/volumeset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cpln.io/org/{org}/gvc/{gvc}/volumeset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'tags' => [

],
'spec' => [
'initialCapacity' => 123,
'storageClassSuffix' => '<string>',
'fileSystemType' => 'ext4',
'customEncryption' => [
'regions' => [

]
],
'snapshots' => [
'createFinalSnapshot' => true,
'retentionDuration' => '<string>',
'schedule' => '<string>'
],
'autoscaling' => [
'maxCapacity' => 123,
'minFreePercentage' => 123,
'scalingFactor' => 123,
'predictive' => [
'enabled' => true,
'lookbackHours' => 123,
'projectionHours' => 123,
'minDataPoints' => 123,
'minGrowthRateGBPerHour' => 123,
'scalingFactor' => 123
]
],
'mountOptions' => [
'resources' => [
'maxCpu' => '2000m',
'minCpu' => '500m',
'minMemory' => '1Gi',
'maxMemory' => '2Gi'
]
]
],
'gvc' => [

]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.cpln.io/org/{org}/gvc/{gvc}/volumeset"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": {},\n \"spec\": {\n \"initialCapacity\": 123,\n \"storageClassSuffix\": \"<string>\",\n \"fileSystemType\": \"ext4\",\n \"customEncryption\": {\n \"regions\": {}\n },\n \"snapshots\": {\n \"createFinalSnapshot\": true,\n \"retentionDuration\": \"<string>\",\n \"schedule\": \"<string>\"\n },\n \"autoscaling\": {\n \"maxCapacity\": 123,\n \"minFreePercentage\": 123,\n \"scalingFactor\": 123,\n \"predictive\": {\n \"enabled\": true,\n \"lookbackHours\": 123,\n \"projectionHours\": 123,\n \"minDataPoints\": 123,\n \"minGrowthRateGBPerHour\": 123,\n \"scalingFactor\": 123\n }\n },\n \"mountOptions\": {\n \"resources\": {\n \"maxCpu\": \"2000m\",\n \"minCpu\": \"500m\",\n \"minMemory\": \"1Gi\",\n \"maxMemory\": \"2Gi\"\n }\n }\n },\n \"gvc\": {}\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.cpln.io/org/{org}/gvc/{gvc}/volumeset")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": {},\n \"spec\": {\n \"initialCapacity\": 123,\n \"storageClassSuffix\": \"<string>\",\n \"fileSystemType\": \"ext4\",\n \"customEncryption\": {\n \"regions\": {}\n },\n \"snapshots\": {\n \"createFinalSnapshot\": true,\n \"retentionDuration\": \"<string>\",\n \"schedule\": \"<string>\"\n },\n \"autoscaling\": {\n \"maxCapacity\": 123,\n \"minFreePercentage\": 123,\n \"scalingFactor\": 123,\n \"predictive\": {\n \"enabled\": true,\n \"lookbackHours\": 123,\n \"projectionHours\": 123,\n \"minDataPoints\": 123,\n \"minGrowthRateGBPerHour\": 123,\n \"scalingFactor\": 123\n }\n },\n \"mountOptions\": {\n \"resources\": {\n \"maxCpu\": \"2000m\",\n \"minCpu\": \"500m\",\n \"minMemory\": \"1Gi\",\n \"maxMemory\": \"2Gi\"\n }\n }\n },\n \"gvc\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.cpln.io/org/{org}/gvc/{gvc}/volumeset")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": {},\n \"spec\": {\n \"initialCapacity\": 123,\n \"storageClassSuffix\": \"<string>\",\n \"fileSystemType\": \"ext4\",\n \"customEncryption\": {\n \"regions\": {}\n },\n \"snapshots\": {\n \"createFinalSnapshot\": true,\n \"retentionDuration\": \"<string>\",\n \"schedule\": \"<string>\"\n },\n \"autoscaling\": {\n \"maxCapacity\": 123,\n \"minFreePercentage\": 123,\n \"scalingFactor\": 123,\n \"predictive\": {\n \"enabled\": true,\n \"lookbackHours\": 123,\n \"projectionHours\": 123,\n \"minDataPoints\": 123,\n \"minGrowthRateGBPerHour\": 123,\n \"scalingFactor\": 123\n }\n },\n \"mountOptions\": {\n \"resources\": {\n \"maxCpu\": \"2000m\",\n \"minCpu\": \"500m\",\n \"minMemory\": \"1Gi\",\n \"maxMemory\": \"2Gi\"\n }\n }\n },\n \"gvc\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "status": 123,
  "message": "<string>",
  "code": "<string>",
  "details": {},
  "id": "<string>"
}
{
"status": 123,
"message": "<string>",
"code": "<string>",
"details": {},
"id": "<string>"
}

Authorizations

Authorization
string
header
required

Service account key can be used as API keys

Path Parameters

org
string
required
gvc
string
required

Body

application/json
name
string
Maximum string length: 64
description
string
Maximum string length: 250
tags
object
spec
object
gvc
object

Response

VolumeSet was created successfully