POST
/
api
/
events
/
count-by
/
{countable}
[
  {
    "value": "<string>",
    "label": "<string>",
    "count": 123,
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z"
  }
]

Headers

x-prefect-api-version
string

Path Parameters

countable
enum<string>
required
Available options:
day,
time,
event,
resource

Body

application/json
filter
object
required
time_unit
enum<string>
Available options:
week,
day,
hour,
minute,
second
time_interval
number
default:
1
Required range: x > 0.01

Response

200
application/json
Successful Response
value
string
required

The value to use for filtering

label
string
required

The value to display for this count

count
integer
required

The count of matching events

start_time
string
required

The start time of this group of events

end_time
string
required

The end time of this group of events