Skip to main content
POST
/
api
/
disks
Create a new disk
curl --request POST \
  --url https://control.green.us-east-1.aws.prod.archil.com/api/disks \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "my-data-disk",
  "mounts": [
    {
      "type": "s3",
      "bucketName": "my-bucket",
      "accessKeyId": "<string>",
      "secretAccessKey": "<string>",
      "sessionToken": "<string>",
      "bucketPrefix": "data/"
    }
  ],
  "authMethods": [
    {
      "type": "token",
      "nickname": "<string>",
      "principal": "<string>",
      "tokenSuffix": "<string>"
    }
  ]
}
'
{
  "success": true,
  "data": {
    "diskId": "dsk-0123456789abcdef",
    "authorizedUsers": [
      {
        "type": "token",
        "principal": "<string>",
        "nickname": "<string>",
        "tokenSuffix": "<string>",
        "token": "<string>",
        "identifier": "<string>",
        "createdAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API key (format key-{API_KEY})

Body

application/json
name
string
required

Disk name (alphanumeric, dashes, underscores)

Required string length: 1 - 100
Pattern: ^[a-zA-Z0-9_-]+$
Example:

"my-data-disk"

mounts
(S3 · object | Google Cloud Storage · object | Cloudflare R2 · object | S3-Compatible · object | Azure Blob Storage · object)[]

Storage mount to attach. Omit for archil-managed storage.

Maximum array length: 1

Mount configuration for Amazon S3 buckets

authMethods
object[]
deprecated

Deprecated. Use AddDiskUser after creation instead. When provided, suppresses the default auto-generated token user.

Response

Disk with this name already exists and configuration matches (idempotent)

success
boolean
required
Example:

true

data
object
required