curl --request POST \
--url https://region.nks.europe-west4.nscale.com/api/v2/filestorage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "storage-name",
"description": "A verbose description",
"tags": [
{
"name": "tag-name",
"value": "tag-value"
}
]
},
"spec": {
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"storageClassId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"regionId": "d891dbf0-0a01-4efc-ae3a-5d77f6d3424b",
"sizeGiB": 200,
"storageType": {
"NFS": {
"rootSquash": true
}
}
}
}
'import requests
url = "https://region.nks.europe-west4.nscale.com/api/v2/filestorage"
payload = {
"metadata": {
"name": "storage-name",
"description": "A verbose description",
"tags": [
{
"name": "tag-name",
"value": "tag-value"
}
]
},
"spec": {
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"storageClassId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"regionId": "d891dbf0-0a01-4efc-ae3a-5d77f6d3424b",
"sizeGiB": 200,
"storageType": { "NFS": { "rootSquash": True } }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
name: 'storage-name',
description: 'A verbose description',
tags: [{name: 'tag-name', value: 'tag-value'}]
},
spec: {
organizationId: '9a8c6370-4065-4d4a-9da0-7678df40cd9d',
projectId: 'e36c058a-8eba-4f5b-91f4-f6ffb983795c',
storageClassId: 'c7568e2d-f9ab-453d-9a3a-51375f78426b',
regionId: 'd891dbf0-0a01-4efc-ae3a-5d77f6d3424b',
sizeGiB: 200,
storageType: {NFS: {rootSquash: true}}
}
})
};
fetch('https://region.nks.europe-west4.nscale.com/api/v2/filestorage', 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://region.nks.europe-west4.nscale.com/api/v2/filestorage",
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([
'metadata' => [
'name' => 'storage-name',
'description' => 'A verbose description',
'tags' => [
[
'name' => 'tag-name',
'value' => 'tag-value'
]
]
],
'spec' => [
'organizationId' => '9a8c6370-4065-4d4a-9da0-7678df40cd9d',
'projectId' => 'e36c058a-8eba-4f5b-91f4-f6ffb983795c',
'storageClassId' => 'c7568e2d-f9ab-453d-9a3a-51375f78426b',
'regionId' => 'd891dbf0-0a01-4efc-ae3a-5d77f6d3424b',
'sizeGiB' => 200,
'storageType' => [
'NFS' => [
'rootSquash' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://region.nks.europe-west4.nscale.com/api/v2/filestorage"
payload := strings.NewReader("{\n \"metadata\": {\n \"name\": \"storage-name\",\n \"description\": \"A verbose description\",\n \"tags\": [\n {\n \"name\": \"tag-name\",\n \"value\": \"tag-value\"\n }\n ]\n },\n \"spec\": {\n \"organizationId\": \"9a8c6370-4065-4d4a-9da0-7678df40cd9d\",\n \"projectId\": \"e36c058a-8eba-4f5b-91f4-f6ffb983795c\",\n \"storageClassId\": \"c7568e2d-f9ab-453d-9a3a-51375f78426b\",\n \"regionId\": \"d891dbf0-0a01-4efc-ae3a-5d77f6d3424b\",\n \"sizeGiB\": 200,\n \"storageType\": {\n \"NFS\": {\n \"rootSquash\": true\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://region.nks.europe-west4.nscale.com/api/v2/filestorage")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"name\": \"storage-name\",\n \"description\": \"A verbose description\",\n \"tags\": [\n {\n \"name\": \"tag-name\",\n \"value\": \"tag-value\"\n }\n ]\n },\n \"spec\": {\n \"organizationId\": \"9a8c6370-4065-4d4a-9da0-7678df40cd9d\",\n \"projectId\": \"e36c058a-8eba-4f5b-91f4-f6ffb983795c\",\n \"storageClassId\": \"c7568e2d-f9ab-453d-9a3a-51375f78426b\",\n \"regionId\": \"d891dbf0-0a01-4efc-ae3a-5d77f6d3424b\",\n \"sizeGiB\": 200,\n \"storageType\": {\n \"NFS\": {\n \"rootSquash\": true\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://region.nks.europe-west4.nscale.com/api/v2/filestorage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"name\": \"storage-name\",\n \"description\": \"A verbose description\",\n \"tags\": [\n {\n \"name\": \"tag-name\",\n \"value\": \"tag-value\"\n }\n ]\n },\n \"spec\": {\n \"organizationId\": \"9a8c6370-4065-4d4a-9da0-7678df40cd9d\",\n \"projectId\": \"e36c058a-8eba-4f5b-91f4-f6ffb983795c\",\n \"storageClassId\": \"c7568e2d-f9ab-453d-9a3a-51375f78426b\",\n \"regionId\": \"d891dbf0-0a01-4efc-ae3a-5d77f6d3424b\",\n \"sizeGiB\": 200,\n \"storageType\": {\n \"NFS\": {\n \"rootSquash\": true\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "storage-name",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2024-05-31T14:11:00Z",
"createdBy": "john.doe@acme.com",
"provisioningStatus": "provisioned",
"healthStatus": "healthy",
"tags": [
{
"name": "tag-name",
"value": "tag-value"
}
]
},
"spec": {
"sizeGiB": 200,
"storageType": {
"NFS": {
"rootSquash": true,
"posixAcl": false,
"atimeUpdateIntervalSeconds": 0
}
},
"attachments": {
"networkIds": [
"903b5fba-8eb0-4016-a854-b8f716bcd9bb"
]
},
"defaultSnapshotProtectionEnabled": true,
"snapshotPolicies": []
},
"status": {
"regionId": "ba39bff5-b0d8-4c60-89e5-ed1104356b4a",
"storageClassId": "99659b44-1700-400f-9c6c-cfdb4bb0445c",
"snapshotPolicies": [],
"usage": {
"capacityBytes": 107374182400,
"usedBytes": 94489280512,
"updatedAt": "2026-01-31T12:00:00Z"
},
"attachments": [
{
"networkId": "903b5fba-8eb0-4016-a854-b8f716bcd9bb",
"mountSource": "10.0.0.16:/mnt/nfs",
"provisioningStatus": "provisioned",
"mountOptions": {
"remoteports": "10.0.0.16-10.0.0.19"
}
}
]
}
}{
"error": "invalid_request",
"error_description": "request body invalid",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "access_denied",
"error_description": "authentication failed",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "unprocessable_content",
"error_description": "the request body was in the wrong format",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "server_error",
"error_description": "failed to token claim",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}Create file storage
Create a new storage. Snapshot Policies are managed as inline parent File Storage desired state. Omitted or empty spec.snapshotPolicies stores no user-managed policies, and a non-empty list persists exactly the caller-supplied policies. Default Snapshot Protection is controlled separately by spec.defaultSnapshotProtectionEnabled.
curl --request POST \
--url https://region.nks.europe-west4.nscale.com/api/v2/filestorage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "storage-name",
"description": "A verbose description",
"tags": [
{
"name": "tag-name",
"value": "tag-value"
}
]
},
"spec": {
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"storageClassId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"regionId": "d891dbf0-0a01-4efc-ae3a-5d77f6d3424b",
"sizeGiB": 200,
"storageType": {
"NFS": {
"rootSquash": true
}
}
}
}
'import requests
url = "https://region.nks.europe-west4.nscale.com/api/v2/filestorage"
payload = {
"metadata": {
"name": "storage-name",
"description": "A verbose description",
"tags": [
{
"name": "tag-name",
"value": "tag-value"
}
]
},
"spec": {
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"storageClassId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"regionId": "d891dbf0-0a01-4efc-ae3a-5d77f6d3424b",
"sizeGiB": 200,
"storageType": { "NFS": { "rootSquash": True } }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
name: 'storage-name',
description: 'A verbose description',
tags: [{name: 'tag-name', value: 'tag-value'}]
},
spec: {
organizationId: '9a8c6370-4065-4d4a-9da0-7678df40cd9d',
projectId: 'e36c058a-8eba-4f5b-91f4-f6ffb983795c',
storageClassId: 'c7568e2d-f9ab-453d-9a3a-51375f78426b',
regionId: 'd891dbf0-0a01-4efc-ae3a-5d77f6d3424b',
sizeGiB: 200,
storageType: {NFS: {rootSquash: true}}
}
})
};
fetch('https://region.nks.europe-west4.nscale.com/api/v2/filestorage', 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://region.nks.europe-west4.nscale.com/api/v2/filestorage",
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([
'metadata' => [
'name' => 'storage-name',
'description' => 'A verbose description',
'tags' => [
[
'name' => 'tag-name',
'value' => 'tag-value'
]
]
],
'spec' => [
'organizationId' => '9a8c6370-4065-4d4a-9da0-7678df40cd9d',
'projectId' => 'e36c058a-8eba-4f5b-91f4-f6ffb983795c',
'storageClassId' => 'c7568e2d-f9ab-453d-9a3a-51375f78426b',
'regionId' => 'd891dbf0-0a01-4efc-ae3a-5d77f6d3424b',
'sizeGiB' => 200,
'storageType' => [
'NFS' => [
'rootSquash' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://region.nks.europe-west4.nscale.com/api/v2/filestorage"
payload := strings.NewReader("{\n \"metadata\": {\n \"name\": \"storage-name\",\n \"description\": \"A verbose description\",\n \"tags\": [\n {\n \"name\": \"tag-name\",\n \"value\": \"tag-value\"\n }\n ]\n },\n \"spec\": {\n \"organizationId\": \"9a8c6370-4065-4d4a-9da0-7678df40cd9d\",\n \"projectId\": \"e36c058a-8eba-4f5b-91f4-f6ffb983795c\",\n \"storageClassId\": \"c7568e2d-f9ab-453d-9a3a-51375f78426b\",\n \"regionId\": \"d891dbf0-0a01-4efc-ae3a-5d77f6d3424b\",\n \"sizeGiB\": 200,\n \"storageType\": {\n \"NFS\": {\n \"rootSquash\": true\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://region.nks.europe-west4.nscale.com/api/v2/filestorage")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"name\": \"storage-name\",\n \"description\": \"A verbose description\",\n \"tags\": [\n {\n \"name\": \"tag-name\",\n \"value\": \"tag-value\"\n }\n ]\n },\n \"spec\": {\n \"organizationId\": \"9a8c6370-4065-4d4a-9da0-7678df40cd9d\",\n \"projectId\": \"e36c058a-8eba-4f5b-91f4-f6ffb983795c\",\n \"storageClassId\": \"c7568e2d-f9ab-453d-9a3a-51375f78426b\",\n \"regionId\": \"d891dbf0-0a01-4efc-ae3a-5d77f6d3424b\",\n \"sizeGiB\": 200,\n \"storageType\": {\n \"NFS\": {\n \"rootSquash\": true\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://region.nks.europe-west4.nscale.com/api/v2/filestorage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"name\": \"storage-name\",\n \"description\": \"A verbose description\",\n \"tags\": [\n {\n \"name\": \"tag-name\",\n \"value\": \"tag-value\"\n }\n ]\n },\n \"spec\": {\n \"organizationId\": \"9a8c6370-4065-4d4a-9da0-7678df40cd9d\",\n \"projectId\": \"e36c058a-8eba-4f5b-91f4-f6ffb983795c\",\n \"storageClassId\": \"c7568e2d-f9ab-453d-9a3a-51375f78426b\",\n \"regionId\": \"d891dbf0-0a01-4efc-ae3a-5d77f6d3424b\",\n \"sizeGiB\": 200,\n \"storageType\": {\n \"NFS\": {\n \"rootSquash\": true\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "storage-name",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2024-05-31T14:11:00Z",
"createdBy": "john.doe@acme.com",
"provisioningStatus": "provisioned",
"healthStatus": "healthy",
"tags": [
{
"name": "tag-name",
"value": "tag-value"
}
]
},
"spec": {
"sizeGiB": 200,
"storageType": {
"NFS": {
"rootSquash": true,
"posixAcl": false,
"atimeUpdateIntervalSeconds": 0
}
},
"attachments": {
"networkIds": [
"903b5fba-8eb0-4016-a854-b8f716bcd9bb"
]
},
"defaultSnapshotProtectionEnabled": true,
"snapshotPolicies": []
},
"status": {
"regionId": "ba39bff5-b0d8-4c60-89e5-ed1104356b4a",
"storageClassId": "99659b44-1700-400f-9c6c-cfdb4bb0445c",
"snapshotPolicies": [],
"usage": {
"capacityBytes": 107374182400,
"usedBytes": 94489280512,
"updatedAt": "2026-01-31T12:00:00Z"
},
"attachments": [
{
"networkId": "903b5fba-8eb0-4016-a854-b8f716bcd9bb",
"mountSource": "10.0.0.16:/mnt/nfs",
"provisioningStatus": "provisioned",
"mountOptions": {
"remoteports": "10.0.0.16-10.0.0.19"
}
}
]
}
}{
"error": "invalid_request",
"error_description": "request body invalid",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "access_denied",
"error_description": "authentication failed",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "unprocessable_content",
"error_description": "the request body was in the wrong format",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "server_error",
"error_description": "failed to token claim",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}Authorizations
Operation requires OAuth 2.0 bearer token authentication.
Body
A request for storage.
A storage create request. Omitted or null NFS POSIX ACL and atime settings resolve to false and 0. When spec.defaultSnapshotProtectionEnabled is omitted, Default Snapshot Protection is enabled. Explicit null defaultSnapshotProtectionEnabled is invalid. When spec.snapshotPolicies is omitted or empty, the API stores no user-managed Snapshot Policies. Non-empty policy lists are stored exactly as supplied.
Was this page helpful?