API
Authentication
All Datafy endpoints use a bearer token for authentication. Pass the token in the Authorization header:
Authorization: Bearer <token>API tokens can be generated by an admin in the Datafy app and are scoped to the account from which they were created.
Account Tokens
Account tokens are scoped to a single sub-account. Requests authenticated with an account token automatically target that account, no additional identifier is needed.
Organization Tokens
Organization tokens are scoped to your organization and can target any sub-account within it. Generate an organization token the same way as an account token, by generating a token while logged in to an organization account in the Datafy app.
Specify the target sub-account using the accounts query parameter:
For single-resource endpoints (e.g. create snapshot, attach, deactivate autoscaling) pass a single sub-account ID:
?accounts=<sub-account-id>For list or aggregate endpoints pass a comma-separated list of sub-account IDs, or
allto include every sub-account in your organization. Theaccountsparameter is required if using an organization token on list and aggregate endpoints.?accounts=<sub-account-id>,<sub-account-id>,... ?accounts=all
Volumes
Retrieve a list of Datafy-managed volumes with their current size, attachment, workload, autoscaling state, ongoing actions, and recent utilization.
Supports filtering, sorting, and pagination.
Target account(s) for the request. On list/aggregate endpoints: a comma-separated list of sub-account ids, or "all" to include every sub-account of the calling org. Required for org users on these endpoints. On single-resource endpoints: at most one sub-account id. Multiple values or "all" are silently ignored and the request runs against the caller's effective account.
Maximum number of records to return (max 1000)
20Number of records to skip for pagination
0volumes matching the requested filters
Bad request
Authentication information is missing or invalid
GET /api/v1/volumes/details HTTP/1.1
Host: api.datafy.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"volumes": [
{
"accountId": "text",
"volumeId": "text",
"underlyingVolumeIds": [
"text"
],
"volumeName": "text",
"diskType": "text",
"originalSize": 1,
"currentSize": 1,
"iops": 1,
"throughput": 1,
"region": "text",
"availabilityZone": "text",
"instanceId": "text",
"device": "text",
"deleteOnTermination": true,
"isBootVolume": true,
"clusterName": "text",
"nodeGroupName": "text",
"autoScalingGroupName": "text",
"autoscalingState": "on",
"eligible": "supported",
"ineligibleReason": "text",
"excludedFromRules": true,
"ongoingActionType": "activate_autoscaling",
"ongoingActionStatus": "queued",
"ongoingActionProgressPercent": 1,
"usedBytes": 1,
"usedPercent": 1,
"lastReportedAt": "2026-01-01T00:00:00.000Z",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
]
}Volume Lifecycle
Create a snapshot of the specified volume
vol-0b9176567fe16f0bcTarget account(s) for the request. On list/aggregate endpoints: a comma-separated list of sub-account ids, or "all" to include every sub-account of the calling org. Required for org users on these endpoints. On single-resource endpoints: at most one sub-account id. Multiple values or "all" are silently ignored and the request runs against the caller's effective account.
Create snapshots only for volumes managed by Datafy
trueCreate the snapshot from the source volume (if it exists) (for internal use only)
falseDescription for the new snapshot
Snapshot of volume vol-0b9176567fe16f0bcSent create snapshot command
Datafy id of the snapshot
dsnap-0b9176567fe16f0bdSource volume id
vol-0b9176567fe16f0bcpendingOriginal size of the source volume
100Snapshot of volume vol-0b9176567fe16f0bcBad request
Authentication information is missing or invalid
POST /api/v1/volumes/{volumeId}/create-snapshot HTTP/1.1
Host: api.datafy.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 141
{
"autoscalingOnly": true,
"description": "Snapshot of volume vol-0b9176567fe16f0bc",
"tags": [
{
"key": "Name",
"value": "My Storage Block Snapshot"
}
]
}{
"datafySnapshotId": "dsnap-0b9176567fe16f0bd",
"volumeId": "vol-0b9176567fe16f0bc",
"status": "pending",
"startTime": "2026-01-01T00:00:00.000Z",
"volumeSizeGb": 100,
"description": "Snapshot of volume vol-0b9176567fe16f0bc"
}Create new Datafy-managed autoscaling volume from Datafy snapshots
Target account(s) for the request. On list/aggregate endpoints: a comma-separated list of sub-account ids, or "all" to include every sub-account of the calling org. Required for org users on these endpoints. On single-resource endpoints: at most one sub-account id. Multiple values or "all" are silently ignored and the request runs against the caller's effective account.
Source specification for creating the autoscaling volume
Created autoscaling volume from Datafy snapshots
vol-0b9176567fe16f0bc20Bad request
Authentication information is missing or invalid
POST /api/v1/volumes/create-from-snapshots HTTP/1.1
Host: api.datafy.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 194
{
"source": {
"datafySnapshotId": "dsnap-0b9176567fe16f0bd"
},
"volumeProperties": {
"availabilityZone": "us-east-1a",
"volumeIops": 3000,
"volumeThroughput": 125,
"tags": [
{
"key": "Name",
"value": "Database"
}
]
}
}{
"volumeId": "vol-0b9176567fe16f0bc",
"volumeSizeGB": 20
}Attach an unattached Datafy-managed autoscaling volume to an instance with Datafy AutoScaler
vol-0b9176567fe16f0bcTarget account(s) for the request. On list/aggregate endpoints: a comma-separated list of sub-account ids, or "all" to include every sub-account of the calling org. Required for org users on these endpoints. On single-resource endpoints: at most one sub-account id. Multiple values or "all" are silently ignored and the request runs against the caller's effective account.
i-09759c0bdec242294/dev/sdbIndicates whether the volume is deleted on instance termination. This flag is only effective when a Datafy agent is present on the instance.
falseAttached autoscaling volume
No content
Bad request
Authentication information is missing or invalid
POST /api/v1/volumes/{volumeId}/attach HTTP/1.1
Host: api.datafy.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"instanceId": "i-09759c0bdec242294",
"deviceName": "/dev/sdb",
"deleteOnTermination": false
}No content
Send deactivate autoscaling command of a specific volume
vol-0b9176567fe16f0bcTarget account(s) for the request. On list/aggregate endpoints: a comma-separated list of sub-account ids, or "all" to include every sub-account of the calling org. Required for org users on these endpoints. On single-resource endpoints: at most one sub-account id. Multiple values or "all" are silently ignored and the request runs against the caller's effective account.
send deactivate autoscaling command
No content
Bad request
Authentication information is missing or invalid
Unprocessable content
POST /api/v1/volumes/{volumeId}/deactivate-autoscaling HTTP/1.1
Host: api.datafy.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Modify the size, IOPS or throughput of a volume. See documentation for required agent versions
vol-0b9176567fe16f0bcTarget account(s) for the request. On list/aggregate endpoints: a comma-separated list of sub-account ids, or "all" to include every sub-account of the calling org. Required for org users on these endpoints. On single-resource endpoints: at most one sub-account id. Multiple values or "all" are silently ignored and the request runs against the caller's effective account.
Desired values for modifying volume. At least one of volumeSizeGb, volumeIops or volumeThroughput is required.
send modify command
No content
Bad request
Authentication information is missing or invalid
POST /api/v1/volumes/{volumeId}/modify HTTP/1.1
Host: api.datafy.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"volumeSizeGb": 10,
"volumeIops": 3000,
"volumeThroughput": 125,
"expandFilesystem": false,
"autoscalingOnly": true
}No content
Last updated
Was this helpful?
