DeluxHostAPI Reference
Storage Boxes

Update storage access protocols

PATCH
/v1/services/{id}/storage/protocols

Send only the fields to change. Turning one off is always allowed and ends its open\nsessions; turning WebDAV or SMB on needs a plan that includes it (400,\ndetails.code: not_in_plan). An empty body changes nothing and returns the box.

Authorization

apiToken storage:write
headerAuthorizationBearer <token>

A personal API token: Authorization: Bearer dh_live_…. See Authentication for scopes.

Scope: storage:write

Path Parameters

id*integer

The service id, as returned by GET /v1/services.

Request Body

application/json
  1. body
sftp?boolean
webdav?boolean
smb?boolean

Response Body

The box after the change.

application/json
  1. response
status*string

creating | active | suspended | error | deleting

errorCode*|

Why the box is in error. Null in every other status.

Value in"node_unreachable""out_of_capacity""unknown"null
quotaGb*integer

The plan's quota, which the node enforces, in GiB (2^30 bytes). More space means a bigger plan.

usedBytes*integer
usagePercent*number

0–100, one decimal.

protocols*

What the plan lets you switch on. sftp is always true.

protocolsInPlan*

What the plan lets you switch on. sftp is always true.

connection*
location*
passwordSetAt*|
Formatdate-time
migrating*boolean

The box is being moved to another server and is unreachable for the cut-over. Every write answers 400 box_not_ready until it clears; connection then already carries the new host and SSH host key fingerprint.

curl -X PATCH 'https://api.deluxhost.net/v1/services/0/storage/protocols' \  -H "Authorization: Bearer $DELUXHOST_TOKEN" \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "status": "string",  "errorCode": "node_unreachable",  "quotaGb": 0,  "usedBytes": 0,  "usagePercent": 0,  "protocols": {    "sftp": true,    "webdav": true,    "smb": true  },  "protocolsInPlan": {    "sftp": true,    "webdav": true,    "smb": true  },  "connection": {    "host": "string",    "username": "string",    "sftpPort": 0,    "webdavUrl": "string",    "smbPath": "string",    "sshHostKeyFingerprint": "string"  },  "location": {    "name": "string",    "country": "string",    "countryCode": "string"  },  "passwordSetAt": "2019-08-24T14:15:22Z",  "migrating": true}