For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 all to include every sub-account in your organization. The accounts parameter is required if using an organization token on list and aggregate endpoints.

    ?accounts=<sub-account-id>,<sub-account-id>,...
    ?accounts=all

Volume Lifecycle

Create snapshot of a volume

post

Create a snapshot of the specified volume

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
volumeIdstringRequiredExample: vol-0b9176567fe16f0bc
Query parameters
accountsstring[]Optional

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.

Body
autoscalingOnlybooleanOptional

Create snapshots only for volumes managed by Datafy

Default: true
useSourceVolumebooleanRead-onlyOptional

Create the snapshot from the source volume (if it exists) (for internal use only)

Default: false
descriptionstringOptional

Description for the new snapshot

Example: Snapshot of volume vol-0b9176567fe16f0bc
Responses
200

Sent create snapshot command

application/json
datafySnapshotIdstringOptional

Datafy id of the snapshot

Example: dsnap-0b9176567fe16f0bd
volumeIdstringOptional

Source volume id

Example: vol-0b9176567fe16f0bc
statusstringOptionalExample: pending
startTimestring · date-timeOptional
volumeSizeGbintegerOptional

Original size of the source volume

Example: 100
descriptionstringOptionalExample: Snapshot of volume vol-0b9176567fe16f0bc
post
/api/v1/volumes/{volumeId}/create-snapshot

Create autoscaling volume from Datafy snapshots

post

Create new Datafy-managed autoscaling volume from Datafy snapshots

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountsstring[]Optional

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.

Body
sourceone ofRequired

Source specification for creating the autoscaling volume

or
Responses
200

Created autoscaling volume from Datafy snapshots

application/json
volumeIdstringOptionalExample: vol-0b9176567fe16f0bc
volumeSizeGBintegerOptionalExample: 20
post
/api/v1/volumes/create-from-snapshots

Attach autoscaling volume

post

Attach an unattached Datafy-managed autoscaling volume to an instance with Datafy AutoScaler

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
volumeIdstringRequiredExample: vol-0b9176567fe16f0bc
Query parameters
accountsstring[]Optional

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.

Body
instanceIdstringRequiredExample: i-09759c0bdec242294
deviceNamestringRequiredExample: /dev/sdb
deleteOnTerminationbooleanOptional

Indicates whether the volume is deleted on instance termination. This flag is only effective when a Datafy agent is present on the instance.

Default: false
Responses
200

Attached autoscaling volume

No content

post
/api/v1/volumes/{volumeId}/attach

No content

Send deactivate autoscaling command

post

Send deactivate autoscaling command of a specific volume

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
volumeIdstringRequiredExample: vol-0b9176567fe16f0bc
Query parameters
accountsstring[]Optional

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.

Responses
200

send deactivate autoscaling command

No content

post
/api/v1/volumes/{volumeId}/deactivate-autoscaling

No content

Modify a volume

post

Modify the size of a specific volume

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
volumeIdstringRequiredExample: vol-0b9176567fe16f0bc
Query parameters
accountsstring[]Optional

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.

Body

Desired values for modifying volume

volumeSizeGBintegerOptional

Desired size of volume, in GiB. Must be larger than current original size

Example: 10
expandFilesystembooleanOptional

Expand filesystem automatically after modifying

Default: falseExample: false
autoscalingOnlybooleanOptional

Modify only volumes managed by Datafy

Default: trueExample: false
Responses
200

send modify command

No content

post
/api/v1/volumes/{volumeId}/modify

No content

Last updated

Was this helpful?