---
title: "Search and list events"
method: POST
path: "/app/v1/events/search"
tags: ["events"]
---

# Search and list events

`POST /app/v1/events/search`

## Query parameters

- `event_schema` string

## Request body

- object
  - `page` number — Which page to return
  - `page_size` number — How many items to list in a page
  - `sort_by` 'name' | 'description' | 'status' | 'classification' | 'start' | 'end' | 'created_at' | 'updated_at'
  - `sort_direction` 'asc' | 'desc' — Sort direction
  - `filter` object — A filter object for events where it can filter based on any of these following fields. No fields are mandatory and the syntax is roughly the same as MongoDB querying.
    - `associated_facility.custom_attributes` object
    - `associated_facility.id` string
    - `associated_facility.name` string
    - `associated_facility.status` string
    - `id` string
    - `name` string
    - `description` string
    - `status` string
    - `start_window` string
    - `end_window` string
    - `classification` string
    - `start` string
    - `end` string
    - `event_schema_id` string
    - `event_category_id` string
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Response `200`

A successful operation

- object
  - `page_number` number
  - `page_size` number
  - `total_entries` number
  - `total_pages` number
  - `data` union[]
    - union
      - EventWithSchema
        - `name` string
        - `description` string
        - `status` 'open' | 'resolved' | 'overdue' | 'dismissed'
        - `classification` 'planned' | 'unplanned'
        - `start` string, date-time
        - `end` string, date-time
        - `event_schema_id` string, uuid
        - `associated_facility_id` string, uuid
        - `completed_at` string, date-time
        - `due_date` string, date-time
        - `created_at` string, date-time
        - `created_by` string, uuid
        - `id` string, uuid
        - `company_id` string, uuid
        - `updated_at` string, date-time
        - `associated_facility` Facility
          - `created_at` string, date-time
          - `updated_at` string, date-time
          - `created_by` string, uuid
          - `updated_by` string, uuid
          - `custom_attributes` CustomAttributes
          - `latitude` number, nullable — latitude on the Earth
          - `longitude` number, nullable — longitude on the Earth
          - `name` string
          - `status` string — Use `id` value of any index in `GET /v1/facility_statuses`
          - `type` string — Use `id` value of any index in `GET /v1/facility_types`
          - `id` string, uuid
        - `duration` string
        - `event_schema` EventSchema
          - `name` string
          - `version` string
          - `priority` 'high' | 'medium' | 'low'
          - `status` 'active' | 'archived'
          - `description` string
          - `config` EventSchemaConfig
            - `has_due_date` boolean
            - `due_date` object
              - …
            - `has_forms` boolean
            - `forms` object
              - …
            - `has_alerts` boolean
            - `has_flows` boolean
            - `has_equipment` boolean
            - `equipment` object
              - …
            - `has_devices` boolean
          - `event_category_id` string, uuid
          - `id` string, uuid
          - `company_id` string, uuid
          - `created_at` string, date-time
          - `created_by` string, uuid
          - `updated_at` string, date-time
          - `updated_by` string, uuid
      - EventWithDuration
        - `name` string
        - `description` string
        - `status` 'open' | 'resolved' | 'overdue' | 'dismissed'
        - `classification` 'planned' | 'unplanned'
        - `start` string, date-time
        - `end` string, date-time
        - `event_schema_id` string, uuid
        - `associated_facility_id` string, uuid
        - `completed_at` string, date-time
        - `due_date` string, date-time
        - `created_at` string, date-time
        - `created_by` string, uuid
        - `id` string, uuid
        - `company_id` string, uuid
        - `updated_at` string, date-time
        - `associated_facility` Facility
          - `created_at` string, date-time
          - `updated_at` string, date-time
          - `created_by` string, uuid
          - `updated_by` string, uuid
          - `custom_attributes` CustomAttributes
          - `latitude` number, nullable — latitude on the Earth
          - `longitude` number, nullable — longitude on the Earth
          - `name` string
          - `status` string — Use `id` value of any index in `GET /v1/facility_statuses`
          - `type` string — Use `id` value of any index in `GET /v1/facility_types`
          - `id` string, uuid
        - `duration` string

---

[API](https://skmtc.net/validere/apis/carbonhub-api.md) · [All operations](https://skmtc.net/validere/apis/carbonhub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/validere/carbonhub-api/revisions/053edab62415/schema)
