> ## 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.

# Put apicollections permissions



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/collections/{id}/permissions/
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/collections/{id}/permissions/:
    put:
      tags:
        - api
      operationId: api_collections_permissions_update
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermissionReplace'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PermissionReplace'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PermissionReplace'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PermissionEntry'
          description: ''
      security:
        - cookieAuthCsrfExempt: []
components:
  schemas:
    PermissionReplace:
      type: object
      properties:
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/PermissionAssignmentWrite'
    PermissionEntry:
      type: object
      properties:
        subject:
          allOf:
            - $ref: '#/components/schemas/PermissionSubject'
          readOnly: true
        flags:
          type: integer
          readOnly: true
      required:
        - flags
        - subject
    PermissionAssignmentWrite:
      type: object
      properties:
        subject_type:
          allOf:
            - $ref: '#/components/schemas/SubjectTypeEnum'
          default: user
        subject_id:
          type: string
          format: uuid
          nullable: true
        flags:
          type: integer
          minimum: 1
      required:
        - flags
    PermissionSubject:
      type: object
      description: |-
        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.
      properties:
        id:
          type: string
          format: uuid
          nullable: true
        subject_type:
          type: string
        name:
          type: string
          readOnly: true
        email:
          type: string
          readOnly: true
      required:
        - email
        - id
        - name
        - subject_type
    SubjectTypeEnum:
      enum:
        - user
        - group
        - public
      type: string
      description: |-
        * `user` - User
        * `group` - Group
        * `public` - Public

````