openapi: 3.0.3
info:
  title: TM Next-Gen - Indexer (APIGEE)
  description: |
    OpenAPI APIGEE mirror of `next-gen-swagger/indexer/next-gen-indexer-api.yaml` — smart search,
    configuration, saved filters, recent searches, and data/criteria ingest. Paths resolve from
    that file via `$ref`.

    **APIGEE-only:** send `api_key` (API key) in addition to `X-reflexis-csrf-token-X` (session token).

    Companion specs: `mywork/next-gen-mywork-apigee-api.yaml`,
    `task-execution/next-gen-task-execution-apigee-api.yaml`.
  version: 1.0.0
  contact:
    name: API Support
    email: noreply@zebra.com

servers:
  - url: https://dev-api.zebra.com
    description: Dev APIGEE
  - url: https://stage-api.zebra.com
    description: Stage APIGEE
  - url: https://test-api.zebra.com
    description: Test APIGEE
  - url: https://api.zebra.com
    description: Prod APIGEE

tags:
  - name: IndexerConfig
    description: Global Smart Search configuration and dynamic filter options
  - name: IndexerSearch
    description: Unified smart-search data retrieval (preview and paginated)
  - name: IndexerSearchFilters
    description: Saved search filters (list, save, delete)
  - name: IndexerRecentSearches
    description: Recent smart-search history (explicit write on redirect)
  - name: IndexerData
    description: Search data record ingest (add, update, delete) — forwards to ztm-indexer
  - name: IndexerCriteria
    description: Search criteria record ingest (add, update, delete) — forwards to ztm-indexer

security:
  - ApiKeyHeader: []
    AuthTokenHeader: []

components:
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: api_key
      description: APIGEE API key header validated by VerifyAPIKey policy.
    AuthTokenHeader:
      $ref: ./next-gen-indexer-api.yaml#/components/securitySchemes/AuthTokenHeader
  schemas:
    JsonObject:
      $ref: ./next-gen-indexer-api.yaml#/components/schemas/JsonObject
    ErrorResponse:
      $ref: ./next-gen-indexer-api.yaml#/components/schemas/ErrorResponse
    CriteriaRecordsRequest:
      $ref: ./next-gen-indexer-api.yaml#/components/schemas/CriteriaRecordsRequest
    DataRecordsRequest:
      $ref: ./next-gen-indexer-api.yaml#/components/schemas/DataRecordsRequest

paths:
  /indexer/v1/config/global-smart-search:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1config~1global-smart-search
  /indexer/v1/config/filter-options:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1config~1filter-options
  /indexer/v1/search/data:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1search~1data
  /indexer/v1/search-filters:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1search-filters
  /indexer/v1/recent-searches/add:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1recent-searches~1add
  /indexer/v1/recent-searches:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1recent-searches
  /indexer/v1/recent-searches/all:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1recent-searches~1all
  /indexer/v1/data:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1data
  /indexer/v1/criteria:
    $ref: ./next-gen-indexer-api.yaml#/paths/~1indexer~1v1~1criteria
