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

# Search resources

> Searches accessible connections, pipelines, jobs, transformations, and named pipeline events across one or more workspaces. Results are ordered by resource type (Pipeline, Job, Transformation, Event, Connection), then by name, workspace ID, and resource ID before global paging is applied. By default, only the first 20 matching resources are returned across all types combined, not 20 per type. Each array contains only the resources on the selected page; an empty array does not mean that no matching resources of that type exist. X-Total-Count reports the total number of matching resources before paging. Use $skip=20&$top=20 for the second page, or resource_type=connection,transformation to restrict the search to those types before paging.



## OpenAPI

````yaml /26.4/en/rest-api/openapi-v2.json get /v2/search
openapi: 3.0.3
info:
  title: CData Sync API
  description: >-
    REST API (v2) for CData Sync. The API lets you manage workspaces,
    connections, jobs, transformations, pipelines, and users, and to run and
    monitor data replication and transformation work.


    ## Base path

    All endpoints are served under the `/api.rsc` application path, e.g.
    `https://your-sync-host/api.rsc/v2/workspaces`.


    ## Authentication

    Requests are authenticated with an auth token passed in the
    `x-cdata-authtoken` header, or with HTTP Basic authentication using a Sync
    user's credentials. A token can be generated via `POST
    /v2/users/generate-token`.


    ## Response envelope

    Successful read/write responses return a JSON **array** of objects, even
    when a single resource is requested (the array then contains one element).
    `count` endpoints return an array containing a single `{ "count": <n> }`
    object. `DELETE` operations return `204 No Content`.


    ## Date/time format

    Date/time values are formatted as `yyyy-MM-dd'T'HH:mm:ssZZZ` (ISO-8601 with
    timezone offset). The format is also echoed in the `X-DateTime-Format`
    response header.


    ## Roles

    Most endpoints require the `cdata_user` role; workspace and user management
    endpoints require the `cdata_admin` role.
  version: '2.0'
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://sync.example.com/api.rsc/v2
        description: >-
          Base URL of your Sync instance, including scheme and application path
          (e.g. https://sync.example.com/api.rsc/v2).
security:
  - ApiKeyAuth: []
  - BasicAuth: []
tags:
  - name: Workspaces
    description: Manage workspaces and their child resources.
  - name: Connections
    description: Manage connections and inspect connection metadata.
  - name: Jobs
    description: Manage replication jobs, their tasks, history, and execution.
  - name: Transformations
    description: Manage transformations, their tasks, history, and execution.
  - name: Pipelines
    description: Manage pipelines, steps, events, history, and execution.
  - name: Users
    description: Manage users and generate auth tokens.
  - name: Vaults
    description: Manage vault registrations and the secrets stored in the Local vault.
  - name: Search
    description: Search accessible resources across workspaces.
paths:
  /v2/search:
    get:
      tags:
        - Search
      summary: Search resources
      description: >-
        Searches accessible connections, pipelines, jobs, transformations, and
        named pipeline events across one or more workspaces. Results are ordered
        by resource type (Pipeline, Job, Transformation, Event, Connection),
        then by name, workspace ID, and resource ID before global paging is
        applied. By default, only the first 20 matching resources are returned
        across all types combined, not 20 per type. Each array contains only the
        resources on the selected page; an empty array does not mean that no
        matching resources of that type exist. X-Total-Count reports the total
        number of matching resources before paging. Use $skip=20&$top=20 for the
        second page, or resource_type=connection,transformation to restrict the
        search to those types before paging.
      operationId: searchResources
      parameters:
        - name: name
          in: query
          required: false
          description: >-
            Exact resource name. When name and $filter are both supplied, both
            conditions must match.
          schema:
            type: string
        - name: resource_type
          in: query
          required: false
          description: >-
            Comma-separated resource types. Supported values are connection,
            pipeline, job, transformation, and event.
          schema:
            type: string
        - name: workspace_id
          in: query
          required: false
          description: >-
            Comma-separated workspace identifiers. When omitted, all accessible
            workspaces are searched. Unknown or inaccessible identifiers do not
            produce results.
          schema:
            type: string
        - $ref: '#/components/parameters/Filter'
        - name: $top
          in: query
          required: false
          description: >-
            Maximum number of matching resources to return across all selected
            resource types combined, not per type. Defaults to 20.
          schema:
            type: integer
            minimum: 0
            default: 20
        - $ref: '#/components/parameters/Skip'
      responses:
        '200':
          $ref: '#/components/responses/SearchResultList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    Filter:
      name: $filter
      in: query
      required: false
      description: >-
        OData-style filter expression applied to the collection, on endpoints
        that support filtering (e.g. `name eq 'my_job'`). Filters on resource
        fields such as `id` and `name`. Substring matching with
        `contains(name,'my_job')` is case-insensitive. `startswith` and
        `endswith` retain their existing behavior; case sensitivity depends on
        the AppDB collation.
      schema:
        type: string
    Skip:
      name: $skip
      in: query
      required: false
      description: >-
        Number of records to skip before returning results (pagination), where
        supported.
      schema:
        type: integer
  responses:
    SearchResultList:
      description: Matching resources on the selected global page.
      headers:
        X-Total-Count:
          description: Total number of matching resources before paging is applied.
          schema:
            type: integer
            minimum: 0
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SearchResults'
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The caller does not have permission to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    SearchResults:
      type: object
      description: >-
        Resources on the selected global page, grouped by type. All five arrays
        are always present. An array can be empty even when matching resources
        of that type exist on another page.
      additionalProperties: false
      required:
        - pipelines
        - jobs
        - transformations
        - events
        - connections
      properties:
        pipelines:
          type: array
          items:
            $ref: '#/components/schemas/SearchPipelineResult'
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/SearchJobResult'
        transformations:
          type: array
          items:
            $ref: '#/components/schemas/SearchTransformationResult'
        events:
          type: array
          items:
            $ref: '#/components/schemas/SearchEventResult'
        connections:
          type: array
          items:
            $ref: '#/components/schemas/SearchConnectionResult'
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: integer
          description: HTTP status code.
        message:
          type: string
          description: Short status message.
        error:
          type: string
          description: Detailed error description.
        error_code:
          type: string
          description: >-
            Stable Vault error category when the failure originated from a Vault
            operation.
          enum:
            - INVALID_REFERENCE
            - PROVIDER_NOT_FOUND
            - ITEM_NOT_FOUND
            - PROVIDER_UNAVAILABLE
            - AUTHENTICATION_FAILED
            - PERMISSION_DENIED
            - TYPE_MISMATCH
            - INVALID_REGISTRATION
            - READ_ONLY
            - UNKNOWN
        provider_id:
          type: string
          description: Vault provider identifier when safe and applicable.
        item_name:
          type: string
          description: Vault item name when safe and applicable.
    SearchPipelineResult:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - workspace_id
        - step_count
        - links
      properties:
        id:
          type: string
        name:
          type: string
        workspace_id:
          type: string
        step_count:
          type: integer
          minimum: 0
          description: Number of steps in a pipeline.
        destination:
          $ref: '#/components/schemas/EntityRef'
        links:
          $ref: '#/components/schemas/SearchResultLinks'
    SearchJobResult:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - workspace_id
        - type
        - links
      properties:
        id:
          type: string
        name:
          type: string
        workspace_id:
          type: string
        type:
          type: string
        source_connection:
          $ref: '#/components/schemas/EntityRef'
        destination_connection:
          $ref: '#/components/schemas/EntityRef'
        links:
          $ref: '#/components/schemas/SearchResultLinks'
    SearchTransformationResult:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - workspace_id
        - type
        - links
      properties:
        id:
          type: string
        name:
          type: string
        workspace_id:
          type: string
        type:
          type: string
        destination_connection:
          $ref: '#/components/schemas/EntityRef'
        links:
          $ref: '#/components/schemas/SearchResultLinks'
    SearchEventResult:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - workspace_id
        - pipeline_id
        - pipeline
        - links
      properties:
        id:
          type: string
        name:
          type: string
        workspace_id:
          type: string
        pipeline_id:
          type: string
        pipeline:
          allOf:
            - $ref: '#/components/schemas/EntityRef'
          description: >-
            Parent Pipeline reference added for displaying the Pipeline name in
            search results.
        links:
          $ref: '#/components/schemas/SearchResultLinks'
    SearchConnectionResult:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - workspace_id
        - connector
        - links
      properties:
        id:
          type: string
        name:
          type: string
        workspace_id:
          type: string
        connector:
          type: string
        links:
          $ref: '#/components/schemas/SearchResultLinks'
    EntityRef:
      type: object
      additionalProperties: false
      description: A lightweight reference to a related resource.
      properties:
        id:
          type: string
        name:
          type: string
        connector:
          type: string
          description: Present for connection references.
        error:
          type: string
          description: Populated if the reference could not be resolved.
    SearchResultLinks:
      type: object
      additionalProperties: false
      required:
        - self
        - ui
      properties:
        self:
          type: string
        ui:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-cdata-authtoken
      description: A Sync user auth token. Generate one via POST /v2/users/generate-token.
    BasicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication with a Sync user's username and API Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.