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

# List viewer campaign items

> Returns a paginated list of campaign review items assigned to the
current authenticated viewer. Matches GraphQL `Campaign.viewerItems`.

Campaign access matches `GET /campaigns/{campaign_id}` and GraphQL
`campaign(id)`: the caller must have access-review read permission or
be a reviewer on the campaign. Otherwise the request fails with 403
(same as get-by-id). Item rows are still scoped to the caller's own
reviews (empty page when the caller is an admin but not a reviewer).




## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /campaigns/{campaign_id}/viewer-items
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: campaigns
    description: Operations related to access review campaigns
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: event-streams
    description: Operations related to event streaming connections
  - 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: opal-queries
    description: Operations related to OpalQuery
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: paladin
    description: Operations related to Paladin
  - 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. Deprecated in favor of the `campaigns` API.
  - name: users
    description: Operations related to users
paths:
  /campaigns/{campaign_id}/viewer-items:
    get:
      tags:
        - campaigns
      summary: List viewer campaign items
      description: |
        Returns a paginated list of campaign review items assigned to the
        current authenticated viewer. Matches GraphQL `Campaign.viewerItems`.

        Campaign access matches `GET /campaigns/{campaign_id}` and GraphQL
        `campaign(id)`: the caller must have access-review read permission or
        be a reviewer on the campaign. Otherwise the request fails with 403
        (same as get-by-id). Item rows are still scoped to the caller's own
        reviews (empty page when the caller is an admin but not a reviewer).
      operationId: getCampaignViewerItems
      parameters:
        - description: The ID of the campaign.
          example: f454d283-ca87-4a8a-bdbb-df212eca5353
          explode: true
          in: path
          name: campaign_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
        - description: The pagination cursor value.
          example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
          explode: true
          in: query
          name: cursor
          required: false
          schema:
            type: string
          style: form
        - description: |
            Number of results to return per page. Default is 200; maximum is
            500.
          example: 200
          explode: true
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            maximum: 500
          style: form
        - description: |
            Sort by. Omit to sort by created_at.
          explode: true
          in: query
          name: sort_field
          required: false
          schema:
            $ref: '#/components/schemas/ViewerCampaignItemSortFieldEnum'
          style: form
        - description: Sort direction.
          explode: true
          in: query
          name: sort_direction
          required: false
          schema:
            $ref: '#/components/schemas/SortDirectionEnum'
          style: form
        - description: |
            Filter by review status. When multiple values are provided,
            items matching any status are returned (OR).
          explode: true
          in: query
          name: statuses
          required: false
          schema:
            items:
              $ref: '#/components/schemas/ViewerCampaignItemStatusEnum'
            type: array
          style: form
        - description: Filter by access level name.
          explode: true
          in: query
          name: access_level_names
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
        - description: Filter by principal ID.
          explode: true
          in: query
          name: principal_ids
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          style: form
        - description: Filter by entity ID.
          explode: true
          in: query
          name: entity_ids
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          style: form
        - description: Filter to specific campaign item review IDs.
          explode: true
          in: query
          name: item_ids
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          style: form
        - description: Restrict to items in this AI-suggestion bucket.
          explode: true
          in: query
          name: ai_bucket_id
          required: false
          schema:
            type: string
            format: uuid
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedViewerCampaignItemsList'
          description: A page of viewer campaign items.
      security:
        - BearerAuth: []
components:
  schemas:
    ViewerCampaignItemSortFieldEnum:
      description: Sort field for viewer campaign items.
      enum:
        - PRINCIPAL_NAME
        - ENTITY_NAME
        - EXPIRATION
        - LAST_USED
      example: PRINCIPAL_NAME
      type: string
    SortDirectionEnum:
      description: Sort direction for viewer campaign items.
      enum:
        - ASC
        - DESC
      example: ASC
      type: string
    ViewerCampaignItemStatusEnum:
      description: Decision status for a viewer campaign item.
      enum:
        - APPROVED
        - REVOKED
        - CHANGE_ROLE
        - NO_ACTION
        - PENDING
        - REASSIGNED
      example: PENDING
      type: string
    PaginatedViewerCampaignItemsList:
      description: A paginated list of viewer campaign items.
      properties:
        next:
          description: |
            The cursor with which to continue pagination if additional result
            pages exist.
          nullable: true
          type: string
        previous:
          description: The cursor used to obtain the current result page.
          nullable: true
          type: string
        results:
          items:
            $ref: '#/components/schemas/ViewerCampaignItem'
          type: array
        total_count:
          description: Total number of items matching the filter (across all pages).
          type: integer
          format: int64
      required:
        - results
        - total_count
      type: object
    ViewerCampaignItem:
      description: |
        A campaign review item assigned to the current viewer, matching
        GraphQL `ViewerCampaignItem`.
      properties:
        campaign_item_review_id:
          description: The ID of the campaign item review.
          format: uuid
          type: string
        decision:
          description: The reviewer's decision. Null when undecided.
          allOf:
            - $ref: '#/components/schemas/ViewerCampaignItemReviewDecisionEnum'
          nullable: true
        note:
          description: Optional note from the reviewer.
          nullable: true
          type: string
        decided_at:
          description: When the decision was finalized.
          format: date-time
          nullable: true
          type: string
        pending_decision:
          description: Pending decision staged by the viewer, if any.
          allOf:
            - $ref: '#/components/schemas/ViewerCampaignItemReviewDecisionEnum'
          nullable: true
        pending_note:
          description: Pending note attached to the reviewer's pending decision.
          nullable: true
          type: string
        updated_access_level_remote_id:
          description: Target access level remote ID when decision is CHANGE_ROLE.
          nullable: true
          type: string
        pending_updated_access_level_remote_id:
          description: Pending target access level remote ID when decision is CHANGE_ROLE.
          nullable: true
          type: string
        reassigned_to_reviewer_ids:
          description: User IDs this review was reassigned to.
          items:
            type: string
            format: uuid
          type: array
        principal_id:
          description: Principal ID from the role assignment.
          format: uuid
          type: string
        principal_type:
          $ref: '#/components/schemas/EntityTypeEnum'
        entity_id:
          description: Entity ID from the role assignment.
          format: uuid
          type: string
        entity_type:
          $ref: '#/components/schemas/EntityTypeEnum'
        access_level_name:
          description: Denormalized access level name.
          nullable: true
          type: string
        access_level_remote_id:
          description: Access level remote ID from the role assignment.
          nullable: true
          type: string
        granted_at:
          description: When the access was originally granted.
          format: date-time
          type: string
        expires_at:
          description: When the access expires, if set.
          format: date-time
          nullable: true
          type: string
        role_assignment_id:
          description: ID of the underlying role assignment.
          format: uuid
          type: string
      required:
        - campaign_item_review_id
        - principal_id
        - principal_type
        - entity_id
        - entity_type
        - granted_at
        - role_assignment_id
      type: object
    ViewerCampaignItemReviewDecisionEnum:
      description: Decision recorded on a campaign item review row.
      enum:
        - APPROVED
        - REVOKED
        - CHANGE_ROLE
        - ADMIN_REVOKED
        - NO_ACTION
        - REASSIGNED
      example: APPROVED
      type: string
    EntityTypeEnum:
      description: The type of an entity.
      enum:
        - GROUP
        - RESOURCE
        - USER
      example: GROUP
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````