curl --request POST \
--url https://rest.compute.cudo.org/v1/projects/{projectId}/volumes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dataCenterId": "<string>",
"id": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": {
"value": "<string>"
},
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": {
"value": "<string>"
}
}
'import requests
url = "https://rest.compute.cudo.org/v1/projects/{projectId}/volumes"
payload = {
"dataCenterId": "<string>",
"id": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": { "value": "<string>" },
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": { "value": "<string>" }
}
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({
dataCenterId: '<string>',
id: '<string>',
sizeGib: 123,
commitmentEndTime: '2023-11-07T05:31:56Z',
commitmentTerm: 'COMMITMENT_TERM_NONE',
gibPriceHr: {value: '<string>'},
state: 'VOLUME_STATE_UNSPECIFIED',
totalPriceHr: {value: '<string>'}
})
};
fetch('https://rest.compute.cudo.org/v1/projects/{projectId}/volumes', 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://rest.compute.cudo.org/v1/projects/{projectId}/volumes",
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([
'dataCenterId' => '<string>',
'id' => '<string>',
'sizeGib' => 123,
'commitmentEndTime' => '2023-11-07T05:31:56Z',
'commitmentTerm' => 'COMMITMENT_TERM_NONE',
'gibPriceHr' => [
'value' => '<string>'
],
'state' => 'VOLUME_STATE_UNSPECIFIED',
'totalPriceHr' => [
'value' => '<string>'
]
]),
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://rest.compute.cudo.org/v1/projects/{projectId}/volumes"
payload := strings.NewReader("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"sizeGib\": 123,\n \"commitmentEndTime\": \"2023-11-07T05:31:56Z\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"gibPriceHr\": {\n \"value\": \"<string>\"\n },\n \"state\": \"VOLUME_STATE_UNSPECIFIED\",\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\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://rest.compute.cudo.org/v1/projects/{projectId}/volumes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"sizeGib\": 123,\n \"commitmentEndTime\": \"2023-11-07T05:31:56Z\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"gibPriceHr\": {\n \"value\": \"<string>\"\n },\n \"state\": \"VOLUME_STATE_UNSPECIFIED\",\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/projects/{projectId}/volumes")
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 \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"sizeGib\": 123,\n \"commitmentEndTime\": \"2023-11-07T05:31:56Z\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"gibPriceHr\": {\n \"value\": \"<string>\"\n },\n \"state\": \"VOLUME_STATE_UNSPECIFIED\",\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": {
"value": "<string>"
},
"nfsPath": "<string>",
"nfsServer": "<string>",
"sizeGibUsed": 123,
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": {
"value": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Create a volume
Creates a new NFS volume.
curl --request POST \
--url https://rest.compute.cudo.org/v1/projects/{projectId}/volumes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dataCenterId": "<string>",
"id": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": {
"value": "<string>"
},
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": {
"value": "<string>"
}
}
'import requests
url = "https://rest.compute.cudo.org/v1/projects/{projectId}/volumes"
payload = {
"dataCenterId": "<string>",
"id": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": { "value": "<string>" },
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": { "value": "<string>" }
}
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({
dataCenterId: '<string>',
id: '<string>',
sizeGib: 123,
commitmentEndTime: '2023-11-07T05:31:56Z',
commitmentTerm: 'COMMITMENT_TERM_NONE',
gibPriceHr: {value: '<string>'},
state: 'VOLUME_STATE_UNSPECIFIED',
totalPriceHr: {value: '<string>'}
})
};
fetch('https://rest.compute.cudo.org/v1/projects/{projectId}/volumes', 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://rest.compute.cudo.org/v1/projects/{projectId}/volumes",
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([
'dataCenterId' => '<string>',
'id' => '<string>',
'sizeGib' => 123,
'commitmentEndTime' => '2023-11-07T05:31:56Z',
'commitmentTerm' => 'COMMITMENT_TERM_NONE',
'gibPriceHr' => [
'value' => '<string>'
],
'state' => 'VOLUME_STATE_UNSPECIFIED',
'totalPriceHr' => [
'value' => '<string>'
]
]),
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://rest.compute.cudo.org/v1/projects/{projectId}/volumes"
payload := strings.NewReader("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"sizeGib\": 123,\n \"commitmentEndTime\": \"2023-11-07T05:31:56Z\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"gibPriceHr\": {\n \"value\": \"<string>\"\n },\n \"state\": \"VOLUME_STATE_UNSPECIFIED\",\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\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://rest.compute.cudo.org/v1/projects/{projectId}/volumes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"sizeGib\": 123,\n \"commitmentEndTime\": \"2023-11-07T05:31:56Z\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"gibPriceHr\": {\n \"value\": \"<string>\"\n },\n \"state\": \"VOLUME_STATE_UNSPECIFIED\",\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/projects/{projectId}/volumes")
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 \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"sizeGib\": 123,\n \"commitmentEndTime\": \"2023-11-07T05:31:56Z\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"gibPriceHr\": {\n \"value\": \"<string>\"\n },\n \"state\": \"VOLUME_STATE_UNSPECIFIED\",\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": {
"value": "<string>"
},
"nfsPath": "<string>",
"nfsServer": "<string>",
"sizeGibUsed": 123,
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": {
"value": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
API key authentication. API keys should be passed using the format Bearer API_KEY.
Path Parameters
Body
Create volume params
COMMITMENT_TERM_NONE, COMMITMENT_TERM_1_MONTH, COMMITMENT_TERM_3_MONTHS, COMMITMENT_TERM_6_MONTHS, COMMITMENT_TERM_12_MONTHS, COMMITMENT_TERM_24_MONTHS, COMMITMENT_TERM_36_MONTHS, COMMITMENT_TERM_60_MONTHS A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
VOLUME_STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, FAILED A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
Response
A successful response.
COMMITMENT_TERM_NONE, COMMITMENT_TERM_1_MONTH, COMMITMENT_TERM_3_MONTHS, COMMITMENT_TERM_6_MONTHS, COMMITMENT_TERM_12_MONTHS, COMMITMENT_TERM_24_MONTHS, COMMITMENT_TERM_36_MONTHS, COMMITMENT_TERM_60_MONTHS A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
VOLUME_STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, FAILED A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes