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

# Get resources non human identities

> Gets the list of non-human identities with access to this resource.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /resources/{resource_id}/non-human-identities
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs
  - name: users
    description: Operations related to users
paths:
  /resources/{resource_id}/non-human-identities:
    get:
      tags:
        - resources
      description: Gets the list of non-human identities with access to this resource.
      operationId: get_resource_nhis
      parameters:
        - description: The ID of the resource.
          example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
          explode: false
          in: path
          name: resource_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
        - description: Limit the number of results returned.
          example: 200
          explode: true
          in: query
          name: limit
          required: false
          schema:
            type: integer
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessList'
          description: List of non-human identities with access to this resource.
      security:
        - BearerAuth: []
components:
  schemas:
    AccessList:
      example:
        results:
          - principal_id: 74908af0-9383-4feb-b7ea-8b305d737338
            principal_type: RESOURCE
            entity_id: db04925a-635d-4764-870e-500b9b035c8e
            entity_type: RESOURCE
            expiration_date: '2022-01-23T04:56:07.000Z'
            has_direct_access: true
            num_access_paths: 3
          - principal_id: d940df34-726a-4403-864e-16cb2a0d6793
            principal_type: RESOURCE
            entity_id: c26cd16c-a3fa-4b82-96b1-32177f8b8f59
            entity_type: RESOURCE
            expiration_date: '2022-01-23T04:56:07.000Z'
            has_direct_access: true
            num_access_paths: 3
      properties:
        results:
          items:
            $ref: '#/components/schemas/Access'
          type: array
      type: object
    Access:
      description: >-
        # Access Object

        ### Description

        The `Access` object is used to represent a principal's access to an
        entity, either directly or inherited.


        ### Usage Example

        Fetch from the `LIST ResourceNonHumanIdentities` endpoint.
      example:
        principal_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
        principal_type: RESOURCE
        entity_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
        entity_type: RESOURCE
        expiration_date: '2022-01-23T04:56:07.000Z'
        has_direct_access: true
        num_access_paths: 3
      properties:
        principal_id:
          description: The ID of the principal with access.
          example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
          format: uuid
          type: string
        principal_type:
          $ref: '#/components/schemas/EntityTypeEnum'
        entity_id:
          description: The ID of the entity being accessed.
          example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
          format: uuid
          type: string
        entity_type:
          $ref: '#/components/schemas/EntityTypeEnum'
        access_level:
          $ref: '#/components/schemas/ResourceAccessLevel'
        expiration_date:
          description: The day and time the principal's access will expire.
          example: '2022-01-23T04:56:07.000Z'
          format: date-time
          nullable: true
          type: string
        has_direct_access:
          description: >-
            The principal has direct access to this entity (vs. inherited
            access).
          example: true
          type: boolean
        num_access_paths:
          description: >-
            The number of ways in which the principal has access to this entity
            (directly and inherited).
          example: 3
          format: int32
          type: integer
      required:
        - principal_id
        - principal_type
        - entity_id
        - entity_type
        - has_direct_access
        - num_access_paths
      type: object
    EntityTypeEnum:
      description: The type of an entity.
      enum:
        - GROUP
        - RESOURCE
        - USER
      example: GROUP
      type: string
    ResourceAccessLevel:
      description: >-
        # Access Level Object

        ### Description

        The `AccessLevel` object is used to represent the level of access that a
        principal has. The "default" access

        level is a `AccessLevel` object whose fields are all empty strings.


        ### Usage Example

        View the `AccessLevel` of a resource/user or resource/group pair to see
        the level of access granted to the resource.
      example:
        access_level_name: AdminRole
        access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess
      properties:
        access_level_name:
          description: The human-readable name of the access level.
          example: AdminRole
          type: string
        access_level_remote_id:
          description: The machine-readable identifier of the access level.
          example: arn:aws:iam::590304332660:role/AdministratorAccess
          type: string
      required:
        - access_level_name
        - access_level_remote_id
      type: object
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````