Skip to Content
CloudAPI and integrationsPublic M2M APIPublic M2M API — volumes

Public M2M API — volumes

Review the operation, its input and access requirements. Parameter names and enum values are protocol identifiers and must retain the exact spelling shown. Optional/defaulted input is marked as such; required fields nested beneath an optional object apply when that object is supplied. Only statically recognized literal constraints are shown; additional validation, conditional requirements and provider rules may apply.

Authentication and permissions · Requests, results and recovery

/api/v1/volumes

Exported methods: GET, POST, DELETE

GET

  • Resource scopes: storage:read
  • Query parameters: serverId, tokenId
  • Response keys observed across outcomes: data, purchases, volumes

POST

  • Resource scopes: storage:write
  • Explicit response statuses: 201, 422
  • Explicit error codes: invalid_request, volume_error
  • Response keys observed across outcomes: action, data, deleteProtection, ok, serverId, size, volume, volumeId

These tables describe the validated form after the server normalizes the submitted input. Include the shown discriminator explicitly to select an alternative; the server may also accept omitted or aliased fields according to its route-specific normalization.

Provide one of these observed alternatives; additional validation may apply.

Payload alternative 1

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionliteralNoNocreate—
tokenIdstringYesNo——
namestringNoNo—min(1), max(64)
sizenumberNoNo—int(), min(10), max(10240)
locationstringYesNo—default("fsn1")
serverstringYesNo——
formatenumYesNoext4, xfsdefault("ext4")
automountbooleanYesNo—default(true)

Payload alternative 2

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionliteralNoNoattach—
tokenIdstringYesNo——
volumeIdstringNoNo—min(1)
serverIdstringNoNo—min(1)
automountbooleanYesNo—default(true)

Payload alternative 3

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionliteralNoNodetach—
tokenIdstringYesNo——
volumeIdstringNoNo—min(1)

Payload alternative 4

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionliteralNoNoresize—
tokenIdstringYesNo——
volumeIdstringNoNo—min(1)
sizenumberNoNo—int(), min(10), max(10240)

Payload alternative 5

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionliteralNoNoprotect—
tokenIdstringYesNo——
volumeIdstringNoNo—min(1)
deleteProtectionbooleanNoNo——

DELETE

  • Resource scopes: storage:write
  • Query parameters: id, tokenId, volumeId
  • Explicit response statuses: 400, 404, 422, 502
  • Explicit error codes: invalid_request, not_found, upstream_error, volume_error
  • Response keys observed across outcomes: deleted, volumeId

Provide volumeId (alias id) in query or JSON. Optional tokenId selects provider deletion; without it the handler resolves a volume/storage-box purchase and terminates it, with a local-only status update for pending-payment or cancelled purchases. Verify provider and purchase results separately.

JSON properties observed: id, tokenId, volumeId.

These names are read by the handler; they are not a complete schema or a promise that every property applies to every branch. Check the validation messages and operation result.

/api/v1/volumes/{id}

Exported methods: GET, PATCH, DELETE

GET

  • Resource scopes: storage:read
  • Path parameters: id
  • Query parameters: tokenId
  • Explicit response statuses: 404
  • Explicit error codes: not_found
  • Response keys observed across outcomes: data, kind, tokenId, volume

PATCH

  • Resource scopes: storage:write
  • Path parameters: id
  • Explicit response statuses: 404, 422, 502
  • Explicit error codes: invalid_request, not_found, upstream_error
  • Response keys observed across outcomes: actions, data, kind, volume

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionenumYesNoattach, detach, resize, set_protection—
automountbooleanYesNo——
deleteProtectionbooleanYesNo——
labelsobjectYesNo——
namestringYesNo—min(1), max(64)
serverIdunionYesNo——
sizenumberYesNo—int(), min(10), max(10000)
sizeGbnumberYesNo—int(), min(10), max(10000)
tokenIdstringYesNo—min(1)

DELETE

  • Resource scopes: storage:write
  • Path parameters: id
  • Query parameters: tokenId
  • Explicit response statuses: 404, 502
  • Explicit error codes: not_found, upstream_error
  • Response keys observed across outcomes: deleted, status, volumeId

Request input was not extracted for this operation; consult its specific contract before sending. Do not infer that no body is required.