File Storage
File Storage provides NFS-based storage shares for workloads requiring file-level access with a standard POSIX interface. Mount storage directly on Linux, Unix, and other compatible systems.
This API follows JSON Merge Patch semantics where null indicates property deletion and absent properties are not modified.
List services
Returns a list of all file storage services in the account.
Query parameters
- Name
limit- Type
- integer
- Description
Number of entries to return (0-100). Default: 10.
- Name
offset- Type
- integer
- Description
Offset for pagination. Default: 0.
- Name
sort- Type
- string
- Description
Sort order: created_at or -created_at.
Request
curl -X GET https://api.upcloud.com/1.3/file-storage \
-u your_username:your_password
Get service details
Returns detailed information about a specific file storage service, including networks, shares, and ACLs.
Request
curl -X GET https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90 \
-u your_username:your_password
Create service
Creates a new file storage service.
Attributes
- Name
name- Type
- string
- Description
Service name (1-64 characters, alphanumeric with - and _). Required.
- Name
zone- Type
- string
- Description
Zone identifier. Required.
- Name
size_gib- Type
- integer
- Description
Storage size in GiB (250-25000). Required.
- Name
configured_status- Type
- string
- Description
Initial status: "started" or "stopped". Required.
- Name
networks- Type
- array
- Description
Network attachments (0-1 networks).
- Name
shares- Type
- array
- Description
NFS shares to create (1-255 shares).
- Name
labels- Type
- array
- Description
Labels for classification (0-255 labels).
Request
curl -X POST https://api.upcloud.com/1.3/file-storage \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"name": "my-file-storage",
"zone": "fi-hel2",
"size_gib": 250,
"configured_status": "started",
"networks": [
{
"uuid": "03720d07-80a9-41ac-90b0-68a932109339",
"name": "net",
"family": "IPv4",
"ip_address": "192.168.147.120"
}
],
"shares": [
{
"name": "public",
"path": "/public",
"acl": [
{"name": "read", "target": "*", "permission": "ro"}
]
}
]
}'
Modify service
Modifies an existing file storage service. Uses JSON Merge Patch semantics.
Request
curl -X PATCH https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90 \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"size_gib": 500,
"configured_status": "stopped"
}'
Delete service
Deletes a file storage service and all its shares.
Request
curl -X DELETE https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90 \
-u your_username:your_password
Get current state
Returns the current operational state of a file storage service including network connectivity and share status.
Request
curl -X GET https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90/current-state \
-u your_username:your_password
List shares
Returns a list of all shares within a file storage service.
Request
curl -X GET https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90/shares \
-u your_username:your_password
Get share details
Returns details of a specific share including its ACL entries.
Request
curl -X GET https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90/shares/public \
-u your_username:your_password
Create share
Creates a new NFS share within the file storage service.
Attributes
- Name
name- Type
- string
- Description
Share name. Required.
- Name
path- Type
- string
- Description
Mount path (e.g., "/data"). Required.
- Name
acl- Type
- array
- Description
Access control list entries.
ACL entry attributes
- Name
name- Type
- string
- Description
ACL entry name.
- Name
target- Type
- string
- Description
IP address, CIDR, or "*" for all.
- Name
permission- Type
- string
- Description
"ro" for read-only or "rw" for read-write.
Request
curl -X POST https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90/shares \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"name": "data",
"path": "/data",
"acl": [
{"name": "rw-access", "target": "192.168.0.0/24", "permission": "rw"}
]
}'
Modify share
Modifies an existing share. Note that updating ACLs requires sending the complete ACL array.
Request
curl -X PATCH https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90/shares/0c34d56e-7890-12fg-h345-678901ijklmn \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"acl": [
{"name": "rw-access", "target": "10.0.0.0/8", "permission": "rw"},
{"name": "ro-access", "target": "*", "permission": "ro"}
]
}'
Delete share
Deletes a share from the file storage service.
Request
curl -X DELETE https://api.upcloud.com/1.3/file-storage/0ad24fe5-d08a-44ea-a0a8-169a46e0cc90/shares/0c34d56e-7890-12fg-h345-678901ijklmn \
-u your_username:your_password