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

# Set one user's, role's or service identity's registry access

> Registry admins: limit a user, role or service identity to the items
given (or lift the limit), replacing what they had. Nobody else changes.
Takes effect on the next lookup and run.



## OpenAPI

````yaml put /api/registry/access/principal
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/registry/access/principal:
    put:
      tags:
        - Registry
      summary: Set one user's, role's or service identity's registry access
      description: |-
        Registry admins: limit a user, role or service identity to the items
        given (or lift the limit), replacing what they had. Nobody else changes.
        Takes effect on the next lookup and run.
      operationId: set_principal_access_api_registry_access_principal_put
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrincipalAccessRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrincipalAccessResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    PrincipalAccessRequest:
      properties:
        kind:
          type: string
          enum:
            - user
            - role
            - identity
          title: Kind
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: >-
            A username, a realm role (not an nx1_ one), or a service identity's
            slug.
        limited:
          type: boolean
          title: Limited
          description: 'True: they see and use only the items given. False: everything.'
        grants:
          items:
            $ref: '#/components/schemas/ItemGrant'
          type: array
          maxItems: 1000
          title: Grants
      type: object
      required:
        - kind
        - name
        - limited
      title: PrincipalAccessRequest
      description: 'A user''s, role''s or service identity''s registry access: the full state.'
    PrincipalAccessResponse:
      properties:
        kind:
          type: string
          enum:
            - user
            - role
            - identity
          title: Kind
        name:
          type: string
          title: Name
          description: The username, role, or identity slug.
        limited:
          type: boolean
          title: Limited
        items:
          items:
            $ref: '#/components/schemas/GivenItem'
          type: array
          title: Items
        updated_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated By
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - kind
        - name
        - limited
      title: PrincipalAccessResponse
      description: What one user, role or service identity may have.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    ItemGrant:
      properties:
        artifact_id:
          type: string
          format: uuid
          title: Artifact Id
        level:
          type: string
          enum:
            - view
            - use
          title: Level
          description: 'view: see it and read it. use: also pin it, run it, load it in chat.'
      type: object
      required:
        - artifact_id
        - level
      title: ItemGrant
      description: One Global item given to a principal.
    GivenItem:
      properties:
        artifact_id:
          type: string
          format: uuid
          title: Artifact Id
        kind:
          $ref: '#/components/schemas/ArtifactKind'
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        level:
          type: string
          enum:
            - view
            - use
          title: Level
        given_to_others:
          type: integer
          title: Given To Others
          description: Other users, roles and identities it is given to.
          default: 0
      type: object
      required:
        - artifact_id
        - kind
        - name
        - display_name
        - level
      title: GivenItem
      description: An item given to a principal, as the Access page lists it.
    ArtifactKind:
      type: string
      enum:
        - agent
        - skill
        - mcp_server
        - tool
        - context_pack
        - ontology
        - prompt
        - workflow
        - brand
        - code_repo
      title: ArtifactKind
      description: What an artifact is.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.