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

# Get Filtered Metadata

> Get paginated filtered metadata based on conditions



## OpenAPI

````yaml /deasy-openapi-stainless.yml post /metadata/filtered
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: /rest/unstructured
security: []
paths:
  /metadata/filtered:
    post:
      tags:
        - Metadata
      summary: Get Filtered Metadata
      description: Get paginated filtered metadata based on conditions
      operationId: get_filtered_metadata_metadata_filtered_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilteredMetadataRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilteredMetadataResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      security:
        - BasicAuth: []
        - BearerAuth: []
          UserIdAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from unstructured import UnstructuredClient

            client = UnstructuredClient(
                username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
                password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
            )
            response = client.metadata.list_filtered(
                data_connector_name="data_connector_name",
            )
            print(response.metadata)
        - lang: JavaScript
          source: >-
            import UnstructuredClient from 'unstructured-sdk';


            const client = new UnstructuredClient({
              authMethod: 'My Auth Method',
              username: process.env['UNSTRUCTURED_USERNAME'], // This is the default and can be omitted
              password: process.env['UNSTRUCTURED_PASSWORD'], // This is the default and can be omitted
            });


            const response = await client.metadata.listFiltered({
            data_connector_name: 'data_connector_name' });


            console.log(response.metadata);
components:
  schemas:
    FilteredMetadataRequest:
      properties:
        data_connector_name:
          type: string
          title: Data Connector Name
        conditions:
          anyOf:
            - $ref: '#/components/schemas/Condition-Input'
            - type: 'null'
        node_condition:
          anyOf:
            - items:
                $ref: '#/components/schemas/TagCondition'
              type: array
            - type: 'null'
          title: Node Condition
          default: []
        offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Offset
          default: 0
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
          default: 50
        dataslice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataslice Id
        search_query:
          anyOf:
            - type: string
            - type: 'null'
          title: Search Query
      type: object
      required:
        - data_connector_name
      title: FilteredMetadataRequest
    FilteredMetadataResponse:
      properties:
        metadata:
          additionalProperties:
            type: object
          type: object
          title: Metadata
        total_matches:
          type: integer
          title: Total Matches
        next_offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Offset
      type: object
      required:
        - metadata
        - total_matches
        - next_offset
      title: FilteredMetadataResponse
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Condition-Input:
      properties:
        condition:
          anyOf:
            - $ref: '#/components/schemas/LogicCondition'
            - type: 'null'
        children:
          anyOf:
            - items:
                $ref: '#/components/schemas/Condition-Input'
              type: array
            - type: 'null'
          title: Children
        tag:
          anyOf:
            - $ref: '#/components/schemas/BaseTag'
            - type: 'null'
      type: object
      title: Condition
    TagCondition:
      properties:
        tag_id:
          type: string
          title: Tag Id
        values:
          anyOf:
            - items:
                anyOf:
                  - type: string
                  - type: number
                  - type: integer
              type: array
            - type: 'null'
          title: Values
        operator:
          anyOf:
            - $ref: '#/components/schemas/OperatorType'
            - type: 'null'
          default: in
      type: object
      required:
        - tag_id
      title: TagCondition
    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
    LogicCondition:
      type: string
      enum:
        - AND
        - OR
      title: LogicCondition
    BaseTag:
      properties:
        name:
          type: string
          title: Name
        values:
          items:
            anyOf:
              - type: string
              - type: number
              - type: integer
          type: array
          title: Values
          default: []
        operator:
          anyOf:
            - type: string
            - type: 'null'
          title: Operator
          default: any
      type: object
      required:
        - name
      title: BaseTag
    OperatorType:
      type: string
      enum:
        - in
        - not_in
      title: OperatorType
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````