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

# Get v2 permissions

> Retrieve permissions for the 'subjectType' 'subjectId'



## OpenAPI

````yaml /api-reference/swagger.yml get /v2/{subjectType}/{subjectId}/permissions
openapi: 3.0.0
info:
  version: 1.0.0
  title: Prisme.ai APIs
  description: Prisme.ai APIs specifications
  termsOfService: https://www.prisme.ai/mentions-legales
  contact:
    name: Prisme.ai Support Team
    email: support@prisme.ai
    url: https://www.prisme.ai
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.eda.prisme.ai
  - url: http://localhost:3001
security:
  - BearerAuth: []
  - WorkspaceApiKeyAuth: []
  - BearerAuth: []
    WorkspaceApiKeyAuth: []
paths:
  /v2/{subjectType}/{subjectId}/permissions:
    get:
      tags:
        - permissions
      description: Retrieve permissions for the 'subjectType' 'subjectId'
      operationId: getPermissions
      parameters:
        - name: subjectType
          in: path
          description: The target subject type
          required: true
          schema:
            $ref: '#/components/schemas/SharableSubjectTypes'
        - name: subjectId
          in: path
          description: >-
            The target subject id (i.e workspaceId if subjectType is
            'workspace')
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                properties:
                  result:
                    $ref: '#/components/schemas/PermissionsList'
        '400':
          description: Bad parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadParametersError'
        '401':
          description: AuthenticationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Object not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectNotFoundError'
components:
  schemas:
    SharableSubjectTypes:
      type: string
      enum:
        - pages
        - workspaces
    PermissionsList:
      type: array
      items:
        $ref: '#/components/schemas/UserPermissions'
      example:
        - target:
            id: userId1
          permissions:
            role: admin
        - target:
            id: userId2
          permissions:
            policies:
              read: true
        - target:
            public: true
          permissions:
            policies:
              read: true
    BadParametersError:
      type: object
      properties:
        error:
          type: string
          example: BadParameters
        message:
          type: string
        details: {}
    AuthenticationError:
      type: object
      properties:
        error:
          type: string
          example: AuthenticationError
        message:
          type: string
          example: Unauthenticated
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: ForbiddenError
        message:
          type: string
          example: Forbidden
    ObjectNotFoundError:
      type: object
      properties:
        error:
          type: string
          example: ObjectNotFound
        message:
          type: string
    UserPermissions:
      type: object
      additionalProperties: false
      required:
        - target
        - permissions
      properties:
        target:
          $ref: '#/components/schemas/UserPermissionsTarget'
        permissions:
          type: object
          properties:
            role:
              $ref: '#/components/schemas/Role'
            policies:
              $ref: '#/components/schemas/Policies'
    UserPermissionsTarget:
      type: object
      anyOf:
        - required:
            - id
        - required:
            - public
        - required:
            - role
      properties:
        id:
          type: string
        public:
          type: boolean
        role:
          type: string
        displayName:
          type: string
    Role:
      type: string
    Policies:
      properties:
        read:
          type: boolean
        write:
          type: boolean
        update:
          type: boolean
        create:
          type: boolean
        manage_permissions:
          type: boolean
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: x-prismeai-api-key

````