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

# List access states

> Returns a paginated list of access states — records of who currently has (or historically had) access to which application resources, including effective time ranges.



## OpenAPI

````yaml GET /api/v1/access_states
openapi: 3.0.0
info:
  description: REST API for AccessOwl third-party integrations
  title: AccessOwl API
  version: 1.0.0
servers:
  - url: https://api.accessowl.com
    variables: {}
security:
  - bearer: []
tags: []
paths:
  /api/v1/access_states:
    get:
      tags:
        - access_states
      summary: List access states
      description: >-
        Returns a paginated list of access states — records of who currently has
        (or historically had) access to which application resources, including
        effective time ranges.
      operationId: AccessOwlApi.AccessStateController.index
      parameters:
        - description: 'Maximum results to return (default: 20, max: 100)'
          in: query
          name: limit
          required: false
          schema:
            type: integer
        - description: >-
            Opaque cursor returned in the previous response's
            `meta.next_cursor`. Omit for the first page.
          in: query
          name: cursor
          required: false
          schema:
            type: string
        - description: Filter by application ID
          in: query
          name: application_id
          required: false
          schema:
            type: string
        - description: Filter by grantee user ID
          in: query
          name: grantee_user_id
          required: false
          schema:
            type: string
        - description: >-
            Comma-separated list of related objects to embed inline alongside
            their ID fields. Allowed values: `grantee_user`, `application`,
            `resource`, `target_permissions`. Embedded objects carry their own
            top-level fields only (no further nesting). An unknown value returns
            400.
          in: query
          name: expand
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessStateList'
          description: Access state list
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized
      callbacks: {}
components:
  schemas:
    AccessStateList:
      description: Paginated list of access states
      properties:
        data:
          description: List of access states
          items:
            $ref: '#/components/schemas/AccessState'
          type: array
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - data
        - meta
      title: AccessStateList
      type: object
    Error:
      description: Standard error response
      example:
        error: not_found
        message: Resource not found
      properties:
        error:
          description: Error code
          example: not_found
          type: string
        errors:
          additionalProperties:
            items:
              type: string
            type: array
          description: Field-specific validation errors (only for 422 responses)
          example:
            email:
              - has invalid format
            first_name:
              - can't be blank
          type: object
        message:
          description: Human-readable error message
          example: Resource not found
          type: string
      required:
        - error
        - message
      title: Error
      type: object
    AccessState:
      description: A current or historical access state
      properties:
        application:
          description: >-
            The application. Only present when requested via
            `expand=application`. Carries the application's own top-level fields
            only.
          nullable: true
          properties:
            description:
              nullable: true
              type: string
            id:
              format: uuid
              type: string
            owner_user_id:
              format: uuid
              nullable: true
              type: string
            provisioning_type:
              nullable: true
              type: string
            risk_level:
              nullable: true
              type: string
            status:
              type: string
            title:
              type: string
            url:
              nullable: true
              type: string
          type: object
        application_id:
          description: Application ID
          format: uuid
          type: string
        effective_end:
          description: When the access ended (null if still effective)
          format: date-time
          nullable: true
          type: string
        effective_start:
          description: When the access became effective
          format: date-time
          type: string
        grantee_user:
          allOf:
            - $ref: '#/components/schemas/User'
          description: >-
            The grantee user. Only present when requested via
            `expand=grantee_user`; null if the grantee is not linked to a user.
          nullable: true
        grantee_user_account_id:
          description: Grantee user account ID (the user's account within the app)
          format: uuid
          type: string
        grantee_user_id:
          description: User ID of the grantee
          format: uuid
          type: string
        group_id:
          description: Group ID (set when access is granted via a group)
          format: uuid
          nullable: true
          type: string
        id:
          description: Access state ID
          format: uuid
          type: string
        resource:
          description: >-
            The resource. Only present when requested via `expand=resource`;
            null for app-wide access. Carries the resource's own top-level
            fields only (no nested permissions).
          nullable: true
          properties:
            application_id:
              format: uuid
              type: string
            description:
              nullable: true
              type: string
            id:
              format: uuid
              type: string
            multiple_permissions_selectable:
              type: boolean
            parent_resource_id:
              format: uuid
              nullable: true
              type: string
            requestable:
              type: boolean
            title:
              type: string
            type:
              type: string
          type: object
        resource_id:
          description: Resource ID (null for app-wide access)
          format: uuid
          nullable: true
          type: string
        target_permission_ids:
          description: Permission IDs currently held
          items:
            format: uuid
            type: string
          type: array
        target_permissions:
          description: >-
            The permissions currently held. Only present when requested via
            `expand=target_permissions`.
          items:
            properties:
              description:
                nullable: true
                type: string
              elevated:
                type: boolean
              id:
                format: uuid
                type: string
              requestable:
                type: boolean
              resource_id:
                format: uuid
                type: string
              title:
                type: string
            type: object
          type: array
      required:
        - id
        - application_id
        - grantee_user_account_id
        - effective_start
      title: AccessState
      type: object
    PaginationMeta:
      description: Pagination metadata
      example:
        page: 1
        page_size: 20
        total_count: 100
        total_pages: 5
      properties:
        page:
          description: Current page number
          type: integer
        page_size:
          description: Items per page
          type: integer
        total_count:
          description: Total number of items
          type: integer
        total_pages:
          description: Total number of pages
          type: integer
      required:
        - page
        - page_size
        - total_count
        - total_pages
      title: PaginationMeta
      type: object
    User:
      description: A user in the organization
      example:
        deactivated_at: null
        departments:
          - Engineering
        email: john@example.com
        employment_type: full_time
        first_name: John
        full_name: John Doe
        id: 7488a646-e31f-11e4-aace-600308960662
        inserted_at: '2023-01-01T00:00:00Z'
        job_title: Software Engineer
        last_name: Doe
        location_city: San Francisco
        manager_user_id: null
        status: active
        teams:
          - Engineering
          - Backend
        updated_at: '2023-01-01T00:00:00Z'
      properties:
        deactivated_at:
          description: Deactivation timestamp
          format: date-time
          nullable: true
          type: string
        departments:
          description: Departments the user belongs to
          items:
            type: string
          type: array
        email:
          description: Email address
          format: email
          type: string
        employment_type:
          description: Employment type
          enum:
            - full_time
            - part_time
            - contract
            - freelance
            - internship
            - apprenticeship
            - working_student
            - training
          nullable: true
          type: string
        first_name:
          description: First name
          type: string
        full_name:
          description: Full name (computed)
          type: string
        id:
          description: User ID
          format: uuid
          type: string
        inserted_at:
          description: Creation timestamp
          format: date-time
          type: string
        job_title:
          description: Job title
          nullable: true
          type: string
        last_name:
          description: Last name
          type: string
        location_city:
          description: City location
          nullable: true
          type: string
        manager_user_id:
          description: Manager user ID
          format: uuid
          nullable: true
          type: string
        status:
          description: Current status
          enum:
            - active
            - inactive
            - onboarding
            - onboarding_provisioning_planned
            - offboarding
            - offboarding_planned
            - offboarded
          type: string
        teams:
          description: Teams the user belongs to
          items:
            type: string
          type: array
        updated_at:
          description: Last update timestamp
          format: date-time
          type: string
      required:
        - id
        - first_name
        - last_name
        - email
        - status
      title: User
      type: object
  securitySchemes:
    bearer:
      description: >-
        Bearer token authentication. Pass your AccessOwl API token in the
        `Authorization` header as `Bearer <token>`.
      scheme: bearer
      type: http

````