Skip to main content
POST
/
volume_templates
Create volume template
curl --request POST \
  --url https://api.blaxel.ai/v0/volume_templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "name": "my-resource",
    "displayName": "My Resource",
    "labels": {}
  },
  "spec": {
    "defaultSize": 123,
    "description": "<string>"
  },
  "state": {},
  "versions": [
    {
      "name": "<string>",
      "templateName": "<string>"
    }
  ]
}
'
{
  "metadata": {
    "name": "my-resource",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "createdBy": "<string>",
    "updatedBy": "<string>",
    "displayName": "My Resource",
    "labels": {},
    "plan": "<string>",
    "url": "<string>",
    "workspace": "<string>"
  },
  "spec": {
    "defaultSize": 123,
    "description": "<string>"
  },
  "state": {
    "lastVersionUploadedAt": "<string>",
    "latestVersion": "<string>",
    "status": "created",
    "versionCount": 123
  },
  "versions": [
    {
      "bucket": "<string>",
      "contentSize": 123,
      "name": "<string>",
      "region": "<string>",
      "status": "CREATED",
      "templateName": "<string>",
      "versionId": "<string>",
      "workspace": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

OAuth2 authentication with JWT tokens

Query Parameters

upload
boolean

If true, returns a presigned URL for uploading the template content

version
string

Version name for the template version being created

Body

application/json

Volume template for creating pre-configured volumes

metadata
object
required

Common metadata fields shared by all Blaxel resources including name, labels, timestamps, and ownership information

spec
object
required

Volume template specification

state
object

Volume template state

versions
object[]

List of versions for this template

Response

200 - application/json

successful operation

Volume template for creating pre-configured volumes

metadata
object
required

Common metadata fields shared by all Blaxel resources including name, labels, timestamps, and ownership information

spec
object
required

Volume template specification

state
object

Volume template state

versions
object[]

List of versions for this template