Skip to main content
POST
cURL

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.

data_volume_limit
integer
required
Required range: x >= 1
max_records
integer
required
Required range: x >= 1
owner_type
enum<string>
  • project - project
  • user - user
  • organization - organization
Available options:
project,
user,
organization
owner_id
string<uuid>
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
repository_name
string
required
read-only
owner_user
object
required

Resolve user.person once per serialization pass.

user.person memoizes per instance, but distinct users in a list are distinct instances — so a list serializer would still issue one Person query per row. When used many=True this mixin routes through :class:_PersonReadThroughListSerializer, which calls User.attach_persons to batch the whole page into a single query; the per-render context cache below then dedups the name+email double-read for each user.

The context cache lives only for the lifetime of the serializer tree, so one .data render resolves each distinct user's Person at most once and re-batches fresh on the next render.

owner_project
object
required
owner_project_id
string<uuid> | null
required
read-only
owner_organization_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
remaining_data_volume_limit
integer
required
read-only
remaining_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
pooled
boolean
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only