Skip to main content
POST
/
api
/
events
/
filter
Read Events
curl --request POST \
  --url https://api.example.com/api/events/filter \
  --header 'Content-Type: application/json' \
  --data '
{
  "filter": {
    "occurred": {
      "since": "2023-11-07T05:31:56Z",
      "until": "2023-11-07T05:31:56Z"
    },
    "event": {
      "prefix": [
        "<string>"
      ],
      "exclude_prefix": [
        "<string>"
      ],
      "name": [
        "<string>"
      ],
      "exclude_name": [
        "<string>"
      ]
    },
    "resource": {
      "id": [
        "<string>"
      ],
      "id_prefix": [
        "<string>"
      ],
      "labels": {},
      "distinct": false
    },
    "related": {
      "id": [
        "<string>"
      ],
      "role": [
        "<string>"
      ],
      "resources_in_roles": [
        "<array>"
      ],
      "labels": {}
    },
    "any_resource": {
      "id": [
        "<string>"
      ],
      "id_prefix": [
        "<string>"
      ],
      "labels": {}
    },
    "id": {
      "id": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    },
    "text": {
      "query": "<string>"
    },
    "order": "DESC"
  },
  "limit": 50
}
'
{
  "events": [
    {
      "occurred": "2023-11-07T05:31:56Z",
      "event": "<string>",
      "resource": {},
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "related": [
        {}
      ],
      "payload": {},
      "follows": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "received": "2023-11-07T05:31:56Z"
    }
  ],
  "total": 123,
  "next_page": "<string>"
}

Headers

x-prefect-api-version
string

Body

application/json
filter
EventFilter · object

Additional optional filter criteria to narrow down the set of Events

limit
integer
default:50

The number of events to return with each page

Required range: 0 <= x <= 50

Response

Successful Response

A single page of events returned from the API, with an optional link to the next page of results

events
ReceivedEvent · object[]
required

The Events matching the query

total
integer
required

The total number of matching Events

next_page
string<uri> | null
required

The URL for the next page of results, if there are more

Minimum string length: 1