campaigns

List viewer campaign items

Changed on

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

get/campaigns/{campaign_id}/viewer-items

Request

  • Base URL
    https://api.opal.dev/v1
  • Auth
    HTTP bearer

Path parameters

campaign_idstring uuid required

The ID of the campaign.

Query parameters

cursorstring

The pagination cursor value.

page_sizeinteger

Number of results to return per page. Default is 200; maximum is 500.

sort_field'PRINCIPAL_NAME' | 'ENTITY_NAME' | 'EXPIRATION' | 'LAST_USED'

Sort field for viewer campaign items.

Example:PRINCIPAL_NAME

Sort by. Omit to sort by created_at.

sort_direction'ASC' | 'DESC'

Sort direction for viewer campaign items.

Example:ASC

Sort direction.

statusesViewerCampaignItemStatusEnum[]

Filter by review status. When multiple values are provided, items matching any status are returned (OR).

[
  "PENDING"
]
access_level_namesstring[]

Filter by access level name.

principal_idsstring[]

Filter by principal ID.

entity_idsstring[]

Filter by entity ID.

item_idsstring[]

Filter to specific campaign item review IDs.

ai_bucket_idstring uuid

Restrict to items in this AI-suggestion bucket.

Response

A page of viewer campaign items.

nextstring nullable

The cursor with which to continue pagination if additional result pages exist.

previousstring nullable

The cursor used to obtain the current result page.

total_countinteger required

Total number of items matching the filter (across all pages).

Example response

{
  "results": [
    {
      "decision": "APPROVED",
      "pending_decision": "APPROVED",
      "principal_type": "GROUP",
      "entity_type": "GROUP"
    }
  ]
}

Changes

    • warning

      added the new REDUCE_EXPIRATION enum value to the ////// response property for the response status

    • warning

      added the new REDUCE_EXPIRATION enum value to the ////// response property for the response status

    • info

      added the enum value REDUCE_EXPIRATION to the property items/ of the query request parameter statuses

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      endpoint added