> ## 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 resent alerts for this contract



## OpenAPI

````yaml /openapi.json post /api/v1/contract/{id}/alert
openapi: 3.0.3
info:
  title: Extractor Project (dev)
  version: 0.0.649
servers: []
security: []
paths:
  /api/v1/contract/{id}/alert:
    post:
      tags:
        - Contract Route
      summary: search resent alerts for this contract
      parameters:
        - name: id
          in: path
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OsQuerySearchRequestDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationDtoRecentAlertDto'
      security:
        - SecurityScheme: []
components:
  schemas:
    OsQuerySearchRequestDto:
      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
        query:
          description: >-
            Query string according to
            https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
            with Default: auto_generate_synonyms_phrase_query=false,
            fuzzy_max_expansions=0, fuzzy_transpositions=false
          type: string
          example: address:0xdAC17F958D2ee523a2206206994597C13D831ec7
        timeseries:
          description: Timestamp ranges for search indices calculation
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/OsIndexRangeDto'
        trackTotalCount:
          format: int32
          description: >-
            Return total results up to 'count' value. If 0, then total tracking
            is disabled and return total=0
          default: 10000
          type: integer
        sort:
          description: Sorting for the search
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/OsSortDto'
    PaginationDtoRecentAlertDto:
      type: object
      properties:
        data:
          description: Response data
          type: array
          items:
            $ref: '#/components/schemas/RecentAlertDto'
        total:
          format: int64
          description: Total amount of document available for this request
          type: integer
    OsIndexRangeDto:
      required:
        - from
        - to
      type: object
      properties:
        from:
          format: int64
          description: From millis timestamp for search indices calculation
          minimum: 0
          type: integer
        to:
          format: int64
          description: To millis timestamp for search indices calculation
          minimum: 0
          type: integer
    OsSortDto:
      required:
        - field
      type: object
      properties:
        field:
          description: Field name for sorting
          pattern: \S
          type: string
          example: timestamp
        mode:
          description: >-
            Used for array values sorting. The mode option controls what array
            value is picked for sorting the document it belongs to Default:
            ascending sort order is Min, descending order is Max
          type: string
          allOf:
            - $ref: '#/components/schemas/SortMode'
        order:
          description: 'Order for the sorting. Default: Asc'
          type: string
          allOf:
            - $ref: '#/components/schemas/SortOrder1'
    RecentAlertDto:
      type: object
      properties:
        uid:
          description: UID of the event
          type: string
        timestamp:
          format: int64
          description: Timestamp, when this entity was persisted to db
          type: integer
        eid:
          description: Id of the event, that produced this entity
          type: string
        txHash:
          description: Hash of the transaction, that produced this event
          type: string
        meta:
          description: Metadata of the object, that produced this event
          type: object
          additionalProperties:
            type: string
        tenantId:
          format: int64
          description: Id of the extractor tenant, that produced this event
          type: integer
        projectId:
          format: int64
          description: Id of the extractor project, that produced this event
          type: integer
        contractId:
          format: int64
          description: Id of the extractor contract, that produced this event
          type: integer
        index:
          description: Index name of the entity
          type: string
        subType:
          description: Sub type of the entity
          type: string
        numericSeverity:
          format: double
          description: Numeric severity of the entity
          type: number
        severity:
          description: Severity of the entity
          type: string
        name:
          description: Alert name of the entity
          type: string
        message:
          description: Alert message of the entity
          type: string
        monitorId:
          description: Monitor id of the event. Used to unique score change on c3
          type: string
        detectorId:
          format: int64
          description: Id of the extractor detector, that produced this event
          type: integer
        detectorSchemaName:
          description: Detector schema name of the entity
          type: string
        s1:
          description: Reserved string field
          type: string
        d1:
          format: double
          description: Reserved double field
          type: number
        d2:
          format: double
          description: Reserved double field
          type: number
        d3:
          format: double
          description: Reserved double field
          type: number
        triggerId:
          format: int64
          description: Trigger alert ID
          type: integer
        actionId:
          format: int64
          description: Action alert ID
          type: integer
    SortMode:
      enum:
        - Min
        - Max
        - Sum
        - Avg
        - Median
      type: string
    SortOrder1:
      enum:
        - Asc
        - Desc
      type: string
  securitySchemes:
    SecurityScheme:
      type: http
      description: Authentication
      scheme: bearer
      bearerFormat: JWT

````