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

# search detectors

> Search by params from response dto



## OpenAPI

````yaml /openapi.json post /api/v1/detector/search
openapi: 3.0.3
info:
  title: Extractor Project (dev)
  version: 0.0.649
servers: []
security: []
paths:
  /api/v1/detector/search:
    post:
      tags:
        - Detector Route
      summary: search detectors
      description: Search by params from response dto
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuerySearchRequestDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationDtoDetectorDto'
      security:
        - SecurityScheme: []
components:
  schemas:
    QuerySearchRequestDto:
      type: object
      properties:
        from:
          format: int32
          description: Starting document offset
          default: 0
          minimum: 0
          type: integer
          example: 0
        size:
          format: int32
          description: The number of hits to return
          default: 10
          maximum: 10000
          minimum: 0
          type: integer
          example: 10
        where:
          description: Query string to search for data. Represent SQL 'where'
          type: string
          example: field1='value' and field2<>'value2'
        sort:
          description: Sorting for the search
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/SortDto'
        trackTotal:
          description: Return total results field if true
          default: false
          type: boolean
    PaginationDtoDetectorDto:
      type: object
      properties:
        data:
          description: Response data
          type: array
          items:
            $ref: '#/components/schemas/DetectorDto'
        total:
          format: int64
          description: Total amount of document available for this request
          type: integer
    SortDto:
      required:
        - field
      type: object
      properties:
        field:
          description: Field name for sorting
          pattern: \S
          type: string
          example: timestamp
        order:
          description: 'Order for the sorting. Default: ASC'
          type: string
          allOf:
            - $ref: '#/components/schemas/SortOrder'
    DetectorDto:
      type: object
      properties:
        id:
          format: int64
          description: Unique identifier of the entity
          type: integer
          example: 1
        createdAt:
          format: int64
          description: Time when entity was created
          type: integer
        updatedAt:
          format: int64
          description: Time when entity was updated
          type: integer
        status:
          description: 'Status of the entity. Default: ''ACTIVE'''
          type: string
          allOf:
            - $ref: '#/components/schemas/Status'
        schema:
          description: >-
            Unique identifier of the detector config schema. Default: 'Basic'
            detector schema
          type: object
          allOf:
            - $ref: '#/components/schemas/BaseDetectorSchemaDto'
        contractId:
          format: int64
          description: >-
            Unique identifier of the contract associated with the extractor
            action
          type: integer
        name:
          description: Name of the detector
          type: string
        source:
          description: Source of the detector events (Kafka topic)
          type: string
          allOf:
            - $ref: '#/components/schemas/DetectorSource'
        tags:
          description: Tags of the detector
          uniqueItems: true
          type: array
          items:
            type: string
        config:
          description: >-
            Configuration of the detector. Should match with Json schema from
            detector type
          type: object
          additionalProperties: {}
        destinations:
          description: List of destinations associated with the entry
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/DestinationDto'
        actions:
          description: List of actions associated with the entry
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/LinkedActionDto'
    SortOrder:
      enum:
        - Asc
        - Desc
      type: string
    Status:
      enum:
        - ACTIVE
        - DISABLED
        - DELETED
      type: string
    BaseDetectorSchemaDto:
      type: object
      properties:
        id:
          format: int64
          description: Unique identifier of the entity
          type: integer
          example: 1
        createdAt:
          format: int64
          description: Time when entity was created
          type: integer
        updatedAt:
          format: int64
          description: Time when entity was updated
          type: integer
        status:
          description: 'Status of the entity. Default: ''ACTIVE'''
          type: string
          allOf:
            - $ref: '#/components/schemas/Status'
        title:
          description: Title of the detector schema, shown to UI user
          type: string
        name:
          description: Name of the detector schema
          type: string
        version:
          description: Version of the detector schema
          type: string
          example: 0.0.1
        description:
          description: Description of the detector schema
          type: string
          example: Detector schema description example
        author:
          description: Author for the detector schema
          type: string
        icon:
          description: Icon for the detector schema
          type: string
        tags:
          description: Detector schema tags. Example SECURITY, COMPLIANCE
          uniqueItems: true
          type: array
          items:
            type: string
        networkTags:
          description: >-
            Detector schema tags, list of groups or networks that are allowed
            for this schema. Can include ChainGroup (network group, eg: 'evm')
            or ChainUid (network eg: 'ethereum'). Empty = any network
          uniqueItems: true
          type: array
          items:
            type: string
    DetectorSource:
      enum:
        - ATTACK_DETECTOR
        - FORTA
        - SENTINEL
      type: string
    DestinationDto:
      type: object
      properties:
        id:
          format: int64
          description: Unique identifier of the entity
          type: integer
          example: 1
        createdAt:
          format: int64
          description: Time when entity was created
          type: integer
        updatedAt:
          format: int64
          description: Time when entity was updated
          type: integer
        status:
          description: 'Status of the entity. Default: ''ACTIVE'''
          type: string
          allOf:
            - $ref: '#/components/schemas/Status'
        tenantDestination:
          description: User contact attached to this destination
          type: object
          allOf:
            - $ref: '#/components/schemas/TenantDestinationDto'
    LinkedActionDto:
      type: object
      properties:
        id:
          format: int64
          description: Unique identifier of the entity
          type: integer
          example: 1
        createdAt:
          format: int64
          description: Time when entity was created
          type: integer
        updatedAt:
          format: int64
          description: Time when entity was updated
          type: integer
        status:
          description: 'Status of the entity. Default: ''ACTIVE'''
          type: string
          allOf:
            - $ref: '#/components/schemas/Status'
        scriptFilter:
          description: >-
            Groovy script, return true if action should be executed. Null mean
            execute all
          type: string
          example: e.severity>=0.5
        scriptParams:
          description: >-
            Groovy script, for each action parameter, return each parameter
            value. Null means use default params
          type: object
          additionalProperties:
            type: string
          example:
            _to: e.getTxHash()
            _value: a.getTimestamp()
        actionId:
          format: int64
          description: Action attached to parent entry
          type: integer
    TenantDestinationDto:
      type: object
      properties:
        id:
          format: int64
          description: Unique identifier of the entity
          type: integer
          example: 1
        createdAt:
          format: int64
          description: Time when entity was created
          type: integer
        updatedAt:
          format: int64
          description: Time when entity was updated
          type: integer
        tenantId:
          format: int64
          description: ID of the tenant
          type: integer
        type:
          description: Type of the destination information
          type: string
          allOf:
            - $ref: '#/components/schemas/ExtDestinationType'
        uid:
          description: The uid which can be used to bind a destination
          type: string
          example: 'Telegram: /start {uid}'
        tags:
          description: Destination tags
          type: array
          items:
            $ref: '#/components/schemas/ExtTenantDestinationTag'
        value:
          description: >-
            The destination information value, e.g., an email address, phone
            number, http uri, etc.
          type: string
        telegramBotUsername:
          description: The telegram bot username
          type: string
        telegramUserId:
          description: The telegram user id
          type: string
        telegramUsername:
          description: The telegram username
          type: string
        telegramChatId:
          description: The telegram chat id
          type: string
        telegramChatTitle:
          description: The telegram chat title
          type: string
        telegramChatType:
          description: The telegram chat type
          type: string
        slackUri:
          description: Webhook slack uri
          type: string
        slackChannelId:
          description: Slack Channel id
          type: string
        slackChannelName:
          description: Slack Channel name
          type: string
        uri:
          description: Http uri
          type: string
        method:
          description: Http method
          type: string
        headers:
          description: Http headers
          type: object
          additionalProperties:
            type: string
    ExtDestinationType:
      enum:
        - EMAIL
        - TELEGRAM
        - HTTP
        - SLACK
      type: string
    ExtTenantDestinationTag:
      enum:
        - DEFAULT
        - DETECTOR
        - WALLET
      type: string
  securitySchemes:
    SecurityScheme:
      type: http
      description: Authentication
      scheme: bearer
      bearerFormat: JWT

````