Skip to content
OvertCMS Docs

Admin API (Dashboard & Team) Entries & Batch

Search valid reference options for a field

GET /admin-api/v1/sites/{siteSlug}/collections/{postType}/fields/{fieldKey}/options

Searches eligible target entries for a reference field, respecting the user's allowedPostTypes. Requires entry:read capability.

Authentication

  • overtcms_access cookie SessionCookie

    HttpOnly SameSite=Lax access token cookie issued by login/setup/refresh. State-changing requests (POST, PATCH, PUT, DELETE) authenticated via cookie must also send a matching same-origin Origin header for CSRF protection.

  • Bearer token BearerJWT

    Human Admin access JWT returned by login/setup/refresh/step-up. Agent API keys (ocms_...) are rejected on the Admin Plane.

Path parameters

  • siteSlug string required
    Site slug.
  • postType string required
    Collection post type slug.
  • fieldKey string required
    Reference field key.

Query parameters

  • q string
    Search query.
  • target string
    Restrict to one target post type.
  • limit integer
    Page size limit.

    min 1, max 100

  • cursor string
    Opaque cursor.

Responses

  • 200 Reference options.

    application/json

    • field string required

      Example author

    • hasMore boolean required

      Example false

    • items array of ReferenceOption required
      Show 5 fields
      • displayLabel string required

        Example Ada Lovelace

      • id string, uuid required
      • postType string required

        Example authors

      • slug string required

        Example ada-lovelace

      • status string required

        Allowed: draftscheduledpublishedarchivedtrashed

        Example published

    • nextCursor string
    • suggestedOptions array of ReferenceOption
      Populated as empty-search rescue suggestions when a query returns 0 matches and totalEligible <= 50.
      Show 5 fields
      • displayLabel string required

        Example Ada Lovelace

      • id string, uuid required
      • postType string required

        Example authors

      • slug string required

        Example ada-lovelace

      • status string required

        Allowed: draftscheduledpublishedarchivedtrashed

        Example published

    • targets array of string required
    • totalEligible integer, int64 required

      Example 12

  • 401 Unauthenticated — missing or expired session cookie / JWT (API keys are rejected).

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 403 Forbidden — insufficient RBAC role capability, CSRF Origin mismatch, post-type restriction, or step-up MFA required.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 404 Post type or field not found.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

Documentation

Start here