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

# Search Resources

> Search across all resource names and IDs within your namespace.

    This endpoint performs a case-insensitive search across:
    - Buckets (bucket_name, bucket_id)
    - Collections (collection_name, collection_id)
    - Retrievers (retriever_name, retriever_id)
    - Taxonomies (taxonomy_name, taxonomy_id)
    - Clusters (cluster_name, cluster_id)
    - Namespaces (namespace_name, namespace_id)

    Results are sorted by relevance (exact matches first) and creation time (newest first).
    Use the resource_types parameter to filter searches to specific resource types.
    Pagination is supported via limit and offset parameters.



## OpenAPI

````yaml post /v1/resources/search
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/resources/search:
    post:
      tags:
        - Resource Search
      summary: Search Resources
      description: |-
        Search across all resource names and IDs within your namespace.

            This endpoint performs a case-insensitive search across:
            - Buckets (bucket_name, bucket_id)
            - Collections (collection_name, collection_id)
            - Retrievers (retriever_name, retriever_id)
            - Taxonomies (taxonomy_name, taxonomy_id)
            - Clusters (cluster_name, cluster_id)
            - Namespaces (namespace_name, namespace_id)

            Results are sorted by relevance (exact matches first) and creation time (newest first).
            Use the resource_types parameter to filter searches to specific resource types.
            Pagination is supported via limit and offset parameters.
      operationId: search_resources_v1_resources_search_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SearchRequest:
      properties:
        query:
          type: string
          minLength: 1
          title: Query
          description: >-
            Search term to match against resource names and IDs. REQUIRED.
            Minimum 1 character. Case-insensitive partial matching is performed.
            Matches against: bucket_name, bucket_id, collection_name,
            collection_id, retriever_name, retriever_id, taxonomy_name,
            taxonomy_id, cluster_name, cluster_id, namespace_name, namespace_id.
            Example: 'prod' matches 'production-videos', 'bkt_prod123',
            'Products Collection'.
          examples:
            - product
            - bkt_
            - video
            - prod
        resource_types:
          anyOf:
            - items:
                type: string
                enum:
                  - bucket
                  - collection
                  - retriever
                  - taxonomy
                  - cluster
                  - published_retriever
                  - namespace
              type: array
            - type: 'null'
          title: Resource Types
          description: >-
            Filter search to specific resource types. OPTIONAL - If not
            provided, searches all resource types. Valid values: 'bucket',
            'collection', 'retriever', 'taxonomy', 'cluster',
            'published_retriever', 'namespace'. Example: ['bucket',
            'collection'] searches only buckets and collections.
          examples:
            - - bucket
              - collection
            - - retriever
              - published_retriever
            - null
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          description: >-
            Maximum number of results to return. OPTIONAL - Defaults to 20.
            Minimum: 1, Maximum: 100. Use with offset for pagination.
          default: 20
          examples:
            - 20
            - 50
            - 100
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: >-
            Number of results to skip for pagination. OPTIONAL - Defaults to 0.
            Minimum: 0. Use with limit for pagination. Example: offset=20 with
            limit=20 returns results 21-40.
          default: 0
          examples:
            - 0
            - 20
            - 40
      type: object
      required:
        - query
      title: SearchRequest
      description: >-
        Request model for searching across resource names and IDs.


        Search is performed across all resource types within the authenticated
        namespace.

        The search is case-insensitive and supports partial matching on both
        names and IDs.


        Use Cases:
            - Find resources by partial name match
            - Locate resources by ID prefix
            - Filter search to specific resource types
            - Paginate through large result sets

        Requirements:
            - query: REQUIRED - Search term (minimum 1 character)
            - resource_types: OPTIONAL - Filter by specific types
            - limit: OPTIONAL - Results per page (1-100, default 20)
            - offset: OPTIONAL - Pagination offset (default 0)
      examples:
        - description: Search all resources for 'product'
          limit: 20
          offset: 0
          query: product
        - description: Search only buckets and collections for 'video'
          limit: 50
          offset: 0
          query: video
          resource_types:
            - bucket
            - collection
        - description: Search by ID prefix with pagination
          limit: 20
          offset: 20
          query: bkt_
          resource_types:
            - bucket
        - description: Search retrievers and taxonomies
          limit: 10
          offset: 0
          query: recommendation
          resource_types:
            - retriever
            - taxonomy
    SearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/SearchResultItem'
          type: array
          title: Results
          description: >-
            List of matched resources. REQUIRED. May be empty if no matches
            found. Sorted by: 1) Exact matches first, 2) Partial matches, 3)
            Created timestamp descending. Length is min(total - offset, limit).
            Each result contains full resource metadata for display.
          examples:
            - - created_at: '2024-01-15T10:30:00Z'
                description: Product catalog
                resource_id: bkt_abc123
                resource_name: products
                resource_type: bucket
            - []
        total:
          type: integer
          minimum: 0
          title: Total
          description: >-
            Total number of matches across all pages. REQUIRED. Count before
            pagination is applied. Use to calculate total pages: ceil(total /
            limit). May be 0 if no matches found. Example: total=50 with
            limit=20 means 3 pages of results.
          examples:
            - 0
            - 15
            - 100
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          description: >-
            Results per page (from request). REQUIRED. Echo of the limit
            parameter from the request. Range: 1-100.
          examples:
            - 20
            - 50
            - 100
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: >-
            Current pagination offset (from request). REQUIRED. Echo of the
            offset parameter from the request. Number of results skipped.
            Example: offset=20 means results start from the 21st match.
          examples:
            - 0
            - 20
            - 40
      type: object
      required:
        - results
        - total
        - limit
        - offset
      title: SearchResponse
      description: >-
        Response model for resource search results.


        Contains paginated search results with metadata about total matches

        and pagination state. Results are sorted by relevance (exact matches
        first,

        then partial matches) and creation time (newest first).


        Use Cases:
            - Display search results to users
            - Implement pagination UI
            - Show total result counts
            - Navigate through large result sets

        Fields:
            - results: List of matched resources
            - total: Total number of matches (before pagination)
            - limit: Results per page (from request)
            - offset: Current pagination offset (from request)
      examples:
        - description: Successful search with multiple results
          limit: 20
          offset: 0
          results:
            - created_at: '2024-01-15T10:30:00Z'
              description: Production video content
              resource_id: bkt_prod123
              resource_name: production-videos
              resource_type: bucket
              updated_at: '2024-01-20T14:22:00Z'
            - created_at: '2024-02-01T08:15:00Z'
              description: Product catalog embeddings
              resource_id: col_prod456
              resource_name: Product Embeddings
              resource_type: collection
          total: 15
        - description: Empty search results
          limit: 20
          offset: 0
          results: []
          total: 0
        - description: Paginated results (page 2)
          limit: 20
          offset: 20
          results:
            - created_at: '2024-03-10T12:00:00Z'
              resource_id: ret_search789
              resource_name: Search Pipeline
              resource_type: retriever
              updated_at: '2024-03-15T16:45:00Z'
          total: 25
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchResultItem:
      properties:
        resource_type:
          type: string
          enum:
            - bucket
            - collection
            - retriever
            - taxonomy
            - cluster
            - published_retriever
            - namespace
          title: Resource Type
          description: >-
            Type of resource this result represents. REQUIRED. One of: 'bucket',
            'collection', 'retriever', 'taxonomy', 'cluster',
            'published_retriever', 'namespace'. Used to identify which resource
            type was matched and how to navigate to it. Example: 'bucket'
            indicates this is a bucket resource.
          examples:
            - bucket
            - collection
            - retriever
            - taxonomy
            - cluster
            - published_retriever
            - namespace
        resource_id:
          type: string
          title: Resource Id
          description: >-
            Unique identifier for the resource. REQUIRED. Format depends on
            resource_type: - bucket: 'bkt_XXXXXXXX' - collection:
            'col_XXXXXXXXXX' - retriever: 'ret_XXXXXXXXXXXXXX' - taxonomy:
            'tax_XXXXXXXXXXXX' - cluster: 'clust_XXXXXXXXXX' -
            published_retriever: 'pk_XXXXXXXXXX' - namespace: 'ns_XXXXXXXXXX'.
            Use this ID to fetch the full resource or perform operations on it.
          examples:
            - bkt_abc12345
            - col_xyz7890123
            - ret_prod4567890abc
            - tax_categories01
            - clust_video0987
            - ns_1669d9e1ca
        resource_name:
          type: string
          title: Resource Name
          description: >-
            Human-readable name of the resource. REQUIRED. This is the field
            that was matched in the search. Corresponds to: bucket_name,
            collection_name, retriever_name, taxonomy_name, cluster_name, or
            public_name. Example: 'Production Videos', 'Product Embeddings',
            'Recommendation Engine', 'my-public-search'.
          examples:
            - Production Videos
            - Product Embeddings
            - Recommendation Engine
            - Employee Taxonomy
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Description of the resource if provided. OPTIONAL - May be null if
            no description was set. Provides additional context about the
            resource's purpose or contents.
          examples:
            - Video content for production environment
            - Product catalog with CLIP embeddings
            - null
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            Timestamp when the resource was created. REQUIRED. ISO 8601 format
            with UTC timezone. Used for sorting results by creation time.
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: >-
            Timestamp when the resource was last updated. OPTIONAL - May be null
            if resource has never been updated. ISO 8601 format with UTC
            timezone.
      type: object
      required:
        - resource_type
        - resource_id
        - resource_name
        - created_at
      title: SearchResultItem
      description: |-
        Individual search result representing a matched resource.

        Contains essential metadata about the matched resource including type,
        ID, name, description, and timestamps. Results are sorted by relevance
        (exact matches first) and creation time.

        Use Cases:
            - Display search results in UI
            - Navigate to specific resources by ID
            - Show resource metadata in search results
            - Filter or sort results client-side

        Fields:
            - resource_type: Type of resource (bucket, collection, etc.)
            - resource_id: Unique identifier for the resource
            - resource_name: Human-readable name
            - description: Optional description text
            - created_at: When the resource was created
            - updated_at: When the resource was last updated (if applicable)
      examples:
        - created_at: '2024-01-15T10:30:00Z'
          description: Video content for production environment
          resource_id: bkt_abc12345
          resource_name: production-videos
          resource_type: bucket
          updated_at: '2024-01-20T14:22:00Z'
        - created_at: '2024-02-01T08:15:00Z'
          description: Product catalog with CLIP embeddings
          resource_id: col_xyz7890123
          resource_name: Product Embeddings
          resource_type: collection
        - created_at: '2024-03-10T12:00:00Z'
          resource_id: ret_prod4567890abc
          resource_name: Recommendation Engine
          resource_type: retriever
          updated_at: '2024-03-15T16:45:00Z'
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````