Box API · Dashboard
Data volumes
Create, attach, detach, resize and delete persistent Box data volumes.
Base URL: https://api.hubfly.space. Use a Dashboard bearer token authorized for the project. Replace :projectId in each path with the Dashboard project ID. JSON routes use Content-Type: application/json.
How to use these endpoints
- Create a project volume with a name and size in GiB.
- Attach it to a Box, then partition, format and mount it in the guest.
- Resize a volume upward when needed; grow its guest filesystem or LVM separately.
- Detach before deleting if your application still uses the disk.
Create a data volume
curl -X POST "https://api.hubfly.space/api/v1/projects/$PROJECT_ID/box-volumes/create" \
-H "Authorization: Bearer $HUBFLY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"app-data","sizeGib":50}'The response uses the standard Dashboard envelope: ok, data, and meta on success. On failure, use the returned error code and message to decide whether to correct the request or retry. The exact schema and response codes for each operation are below.
Endpoint reference
Dashboard endpoints (3)
These JSON routes are served by the Hubfly space Dashboard API and use Dashboard project authorization.
| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/projects/:projectId/box-volumes/create | Create a data volume |
| GET | /api/v1/projects/:projectId/box-volumes | List data volumes |
| POST | /api/v1/projects/:projectId/box-volumes/:volumeId/mutate | Change a data volume |
POSTCreate a data volumeDetails +/api/v1/projects/:projectId/box-volumes/create
Create a project data volume of the requested GiB capacity. Attach it separately before using it in a guest.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
JSON request body
| Field | Type / allowed values | Required |
|---|---|---|
name | string | Yes |
sizeGib | number | Yes |
Complete request schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"sizeGib": {
"type": "number"
}
},
"required": [
"name",
"sizeGib"
],
"additionalProperties": false
}Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "id": { "type": "string" }, "operationId": { "type": "string" } }, "required": [ "id", "operationId" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "id": "string", "operationId": "string" }, "meta": { "requestId": "string", "timestamp": "string" } }
GETList data volumesDetails +/api/v1/projects/:projectId/box-volumes
Read project data volumes, sizes, attachment targets and provisioning states.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "array", "items": { "type": "object", "properties": { "createdAt": { "type": "string", "description": "Date string" }, "updatedAt": { "type": "string", "description": "Date string" }, "id": { "type": "string" }, "projectId": { "type": "string" }, "runtimeId": { "type": "string", "nullable": true }, "name": { "type": "string" }, "sizeGib": { "type": "number" }, "format": { "type": "string" }, "status": { "type": "string" }, "attachedBoxId": { "type": "string", "nullable": true }, "target": { "type": "string", "nullable": true }, "deletedAt": { "type": "string", "description": "Date string", "nullable": true } }, "required": [ "createdAt", "updatedAt", "id", "projectId", "runtimeId", "name", "sizeGib", "format", "status", "attachedBoxId", "target", "deletedAt" ], "additionalProperties": false } }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": [ { "createdAt": "string", "updatedAt": "string", "id": "string", "projectId": "string", "runtimeId": "string", "name": "string", "sizeGib": 0, "format": "string", "status": "string", "attachedBoxId": "string", "target": "string", "deletedAt": "string" } ], "meta": { "requestId": "string", "timestamp": "string" } }
POSTChange a data volumeDetails +/api/v1/projects/:projectId/box-volumes/:volumeId/mutate
Request attach, detach, grow, or delete. Size is used for growth; boxId and target select attachment. Follow the operation.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
volumeId | path | Yes | string | — |
JSON request body
| Field | Type / allowed values | Required |
|---|---|---|
action | delete | resize | attach | detach | Yes |
sizeGib | number | No |
boxId | string | No |
target | string | No |
Complete request schema
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"delete",
"resize",
"attach",
"detach"
]
},
"sizeGib": {
"type": "number"
},
"boxId": {
"type": "string"
},
"target": {
"type": "string"
}
},
"required": [
"action"
],
"additionalProperties": false
}Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "operationId": { "type": "string" } }, "required": [ "operationId" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "operationId": "string" }, "meta": { "requestId": "string", "timestamp": "string" } }