Skip to main content
POST
/
api
/
allocations
/
cURL
curl --request POST \
  --url https://{server}/api/allocations/ \
  --header 'Content-Type: application/json' \
  --cookie sessionid= \
  --data '
{
  "owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "data_volume_limit": 2,
  "max_records": 2,
  "repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "alias": "<string>",
  "attach_to_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "attach_to_collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "owner_user": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "email": "jsmith@example.com",
    "name": "<string>",
    "is_system_admin": true,
    "is_repository_admin": true,
    "date_joined": "2023-11-07T05:31:56Z"
  },
  "owner_project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "children_count": 123,
  "alias": "<string>",
  "data_volume_limit": 123,
  "max_records": 123,
  "current_bytes": 123,
  "current_record_count": 123,
  "is_default": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

sessionid
string
cookie
required

Body

Write-side serializer for provisioning a new Allocation.

is_default is intentionally not exposed — admins who want to swap an owner's default use POST /api/allocations/{id}/default/ which atomically flips the partial unique constraint.

Optional parent_id creates a sub-Allocation carved from the named parent. When supplied, repository_id is ignored (the view inherits the parent's repository) and the caller must own the parent directly. Thin-provisioning means no sum-check against the parent's remaining headroom at creation — capacity is enforced at upload time.

owner_type
enum<string>
required
  • project - project
  • user - user
Available options:
project,
user
owner_id
string<uuid>
required
data_volume_limit
integer
required
Required range: x >= 1
max_records
integer
required
Required range: x >= 1
repository_id
string<uuid>
parent_id
string<uuid> | null
alias
string
Maximum string length: 255
attach_to_asset_id
string<uuid> | null
attach_to_collection_id
string<uuid> | null

Response

201 - application/json
id
string<uuid>
required
read-only
repository_id
string<uuid>
required
read-only
owner_user
object
required
owner_project_id
string<uuid> | null
required
read-only
parent_id
string<uuid> | null
required
read-only
children_count
integer
required
read-only
alias
string
required
read-only
data_volume_limit
integer
required
read-only
max_records
integer
required
read-only
current_bytes
integer
required
read-only
current_record_count
integer
required
read-only
is_default
boolean
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only