Skip to content

File Storage

All operations require authentication.

5 operationsv2/publicCloud/project
Agent setup

List file storagesProduction

GET
/v2/publicCloud/project/{projectId}/storage/file/share

Returns the file storages of the project.

Path parameters

projectId
required
string

Project ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200FileStorage[]successful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the file storage

currentState
read-only
FileStorageCurrentState

Current observed state of the file storage from the infrastructure

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the file storage

id
read-only
stringuuid

Unique identifier of the file storage

resourceStatus
read-only
ResourceStatusEnum

File storage readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
FileStorageTargetSpec

Last target specification of the file storage

updatedAt
read-only
stringdate-time

Last update date of the file storage

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/file/share \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "capabilities": [ { "enabled": true, "name": "ACL_MANAGEMENT", "reason": "HAS_DEPENDENT_SNAPSHOTS" } ], "description": "string", "encryption": { "enabled": true }, "exportLocations": [ { "path": "string", "preferred": true } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "snapshotId": "00000000-0000-0000-0000-000000000000" }, "description": "string", "encryption": { "enabled": true }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "updatedAt": "2024-01-01T12:00:00Z" }]

Get a file storageProduction

GET
/v2/publicCloud/project/{projectId}/storage/file/share/{fileStorageId}

Returns the file storage configuration and its current state, including the NFS export paths to mount it.

Path parameters

fileStorageId
required
stringuuid

File storage ID

projectId
required
string

Project ID

Response

200FileStoragesuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the file storage

currentState
read-only
FileStorageCurrentState

Current observed state of the file storage from the infrastructure

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the file storage

id
read-only
stringuuid

Unique identifier of the file storage

resourceStatus
read-only
ResourceStatusEnum

File storage readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
FileStorageTargetSpec

Last target specification of the file storage

updatedAt
read-only
stringdate-time

Last update date of the file storage

404objectError 404 response

Example uses fileStorageId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/file/share/{fileStorageId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "capabilities": [ { "enabled": true, "name": "ACL_MANAGEMENT", "reason": "HAS_DEPENDENT_SNAPSHOTS" } ], "description": "string", "encryption": { "enabled": true }, "exportLocations": [ { "path": "string", "preferred": true } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "snapshotId": "00000000-0000-0000-0000-000000000000" }, "description": "string", "encryption": { "enabled": true }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "updatedAt": "2024-01-01T12:00:00Z"}

Create a file storageProduction

POST
/v2/publicCloud/project/{projectId}/storage/file/share

Creates a file storage, either empty or from a snapshot.

Without createFrom, shareType, shareNetwork and size are required.

With createFrom.snapshotId, the file storage is created from that snapshot, which must belong to the same project and be in the region set in location.region. An unknown snapshot is rejected with a 404. The snapshot must be available: a snapshot in any other status is rejected with a 409. shareType and encryption are the values of the snapshot's source file storage and are returned in targetSpec: requesting encryption.enabled true from a snapshot of an unencrypted file storage is rejected as an invalid parameter, and requesting encryption.enabled false from a snapshot of an encrypted file storage is ignored. size is optional: when omitted, the snapshot's size is used and returned in targetSpec, and a size smaller than the snapshot's size is rejected. shareNetwork is optional: when omitted, the share network of the snapshot's source file storage is used and returned in targetSpec, and a different share network is rejected.

createFrom is set at creation only and cannot be changed afterward.

Path parameters

projectId
required
string

Project ID

Request body (required)

targetSpec
required
FileStorageTargetSpec

Desired target specification for the file storage

Response

200FileStoragesuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the file storage

currentState
read-only
FileStorageCurrentState

Current observed state of the file storage from the infrastructure

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the file storage

id
read-only
stringuuid

Unique identifier of the file storage

resourceStatus
read-only
ResourceStatusEnum

File storage readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
FileStorageTargetSpec

Last target specification of the file storage

updatedAt
read-only
stringdate-time

Last update date of the file storage

400objectError 400 response
404objectError 404 response
409objectError 409 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/file/share \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "capabilities": [ { "enabled": true, "name": "ACL_MANAGEMENT", "reason": "HAS_DEPENDENT_SNAPSHOTS" } ], "description": "string", "encryption": { "enabled": true }, "exportLocations": [ { "path": "string", "preferred": true } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "snapshotId": "00000000-0000-0000-0000-000000000000" }, "description": "string", "encryption": { "enabled": true }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "updatedAt": "2024-01-01T12:00:00Z"}

Delete a file storageProduction

DELETE
/v2/publicCloud/project/{projectId}/storage/file/share/{fileStorageId}

Deletes the file storage. A file storage that still has snapshots cannot be deleted: delete them first.

Path parameters

fileStorageId
required
stringuuid

File storage ID

projectId
required
string

Project ID

Response

200FileStoragesuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the file storage

currentState
read-only
FileStorageCurrentState

Current observed state of the file storage from the infrastructure

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the file storage

id
read-only
stringuuid

Unique identifier of the file storage

resourceStatus
read-only
ResourceStatusEnum

File storage readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
FileStorageTargetSpec

Last target specification of the file storage

updatedAt
read-only
stringdate-time

Last update date of the file storage

404objectError 404 response
409objectError 409 response

Example uses fileStorageId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/file/share/{fileStorageId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "capabilities": [ { "enabled": true, "name": "ACL_MANAGEMENT", "reason": "HAS_DEPENDENT_SNAPSHOTS" } ], "description": "string", "encryption": { "enabled": true }, "exportLocations": [ { "path": "string", "preferred": true } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "snapshotId": "00000000-0000-0000-0000-000000000000" }, "description": "string", "encryption": { "enabled": true }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "updatedAt": "2024-01-01T12:00:00Z"}

Update a file storageProduction

PUT
/v2/publicCloud/project/{projectId}/storage/file/share/{fileStorageId}

Replaces the file storage's target specification as a whole. The body carries the complete desired state of every field publicCloud.storage.file.FileStorageUpdateTargetSpec exposes (description, name and size), so read the file storage first and restate every value you want to keep: a field left out of targetSpec is cleared, not carried over from the stored specification. Leaving description out clears the description.

The create-only fields protocol, shareType, shareNetwork, location, encryption and createFrom cannot be changed once the file storage exists. They are deliberately absent from the update model, and sending one is rejected with a 400.

name and size are both required. size can only grow: restate the current size to keep it, or send a larger value to extend the file storage, because shrinking one is not supported.

The optional checksum guards against a lost update: when supplied it must match the file storage's current checksum or the request is rejected with a 409 checksum mismatch. Omitting it skips the check and forces the write (last-write-wins).

Path parameters

fileStorageId
required
stringuuid

File storage ID

projectId
required
string

Project ID

Request body (required)

checksum
string

Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).

targetSpec
required
FileStorageUpdateTargetSpec

Desired target specification for the file storage

Response

200FileStoragesuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the file storage

currentState
read-only
FileStorageCurrentState

Current observed state of the file storage from the infrastructure

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the file storage

id
read-only
stringuuid

Unique identifier of the file storage

resourceStatus
read-only
ResourceStatusEnum

File storage readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
FileStorageTargetSpec

Last target specification of the file storage

updatedAt
read-only
stringdate-time

Last update date of the file storage

400objectError 400 response
404objectError 404 response
409objectError 409 response

Example uses fileStorageId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/file/share/{fileStorageId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "capabilities": [ { "enabled": true, "name": "ACL_MANAGEMENT", "reason": "HAS_DEPENDENT_SNAPSHOTS" } ], "description": "string", "encryption": { "enabled": true }, "exportLocations": [ { "path": "string", "preferred": true } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "snapshotId": "00000000-0000-0000-0000-000000000000" }, "description": "string", "encryption": { "enabled": true }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "protocol": "NFS", "shareNetwork": { "id": "00000000-0000-0000-0000-000000000000" }, "shareType": "STANDARD_1AZ", "size": 0 }, "updatedAt": "2024-01-01T12:00:00Z"}