> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataerai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post apirepositories



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/repositories/
openapi: 3.0.3
info:
  title: Console API
  version: 1.0.0
  description: Central control plane API for the Dataerai platform.
servers:
  - url: https://{server}
    description: Your Dataerai deployment (the API is served under /api)
    variables:
      server:
        default: your-deployment.dataerai.com
        description: Host of your Dataerai deployment
security: []
paths:
  /api/repositories/:
    post:
      tags:
        - api
      operationId: api_repositories_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RepositoryWrite'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RepositoryWrite'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RepositoryWrite'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repository'
          description: ''
      security:
        - cookieAuthCsrfExempt: []
components:
  schemas:
    RepositoryWrite:
      type: object
      description: |-
        Write-side fields for Repository create + partial update.

        Two callable paths depending on SPAWNER_BACKEND:

        - Legacy (SPAWNER_BACKEND=none): admin supplies ``address`` pointing
          at an already-running repo-agent. ``bucket`` / ``region`` /
          ``endpoint`` / keys are ignored.
        - Console-managed (SPAWNER_BACKEND=docker or kubernetes): admin
          supplies ``bucket`` / ``region`` / ``endpoint`` / ``access_key_id``
          / ``secret_access_key``. ``address`` is read-only — the Console
          computes it once the spawn succeeds.

        The view picks the path.
      properties:
        name:
          type: string
          maxLength: 255
        type:
          $ref: '#/components/schemas/RepositoryTypeEnum'
        address:
          type: string
          maxLength: 1024
        capacity:
          type: integer
          minimum: 0
        bucket:
          type: string
          maxLength: 255
        region:
          type: string
          maxLength: 64
        endpoint:
          type: string
          maxLength: 1024
        access_key_id:
          type: string
          writeOnly: true
          maxLength: 255
        secret_access_key:
          type: string
          writeOnly: true
          maxLength: 1024
        access_grant:
          type: string
          writeOnly: true
        irsa_role_arn:
          type: string
          maxLength: 2048
      required:
        - capacity
        - name
        - type
    Repository:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        type:
          $ref: '#/components/schemas/RepositoryTypeEnum'
        address:
          type: string
          maxLength: 1024
        capacity:
          type: integer
          maximum: 9223372036854776000
          minimum: -9223372036854776000
          format: int64
        is_active:
          type: boolean
        usage_bytes:
          type: integer
          format: int64
          readOnly: true
        asset_content_count:
          type: integer
          format: int64
          readOnly: true
        bucket:
          type: string
          maxLength: 255
        region:
          type: string
          maxLength: 64
        endpoint:
          type: string
          maxLength: 1024
        access_key_id_masked:
          type: string
          nullable: true
          readOnly: true
        irsa_role_arn:
          type: string
          maxLength: 2048
        provider:
          type: string
          readOnly: true
        provisioning_status:
          allOf:
            - $ref: '#/components/schemas/ProvisioningStatusEnum'
          readOnly: true
        provisioning_error:
          type: string
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - access_key_id_masked
        - address
        - asset_content_count
        - capacity
        - created_at
        - id
        - name
        - provider
        - provisioning_error
        - provisioning_status
        - type
        - updated_at
        - usage_bytes
    RepositoryTypeEnum:
      enum:
        - s3
        - storj
        - posix
      type: string
      description: |-
        * `s3` - S3
        * `storj` - Storj
        * `posix` - POSIX
    ProvisioningStatusEnum:
      enum:
        - pending
        - ready
        - failed
      type: string
      description: |-
        * `pending` - Pending
        * `ready` - Ready
        * `failed` - Failed

````