prefect.server.api.events
count_account_events(filter, countable=Path(...), time_unit=Body(default=TimeUnit.day), time_interval=Body(default=1.0, ge=0.01), db=Depends(provide_database_interface))
async
Returns distinct objects and the count of events associated with them. Objects that can be counted include the day the event occurred, the type of event, or the IDs of the resources associated with the event.
Source code in src/prefect/server/api/events.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
|
create_events(events, ephemeral_request=Depends(is_ephemeral_request))
async
Record a batch of Events
Source code in src/prefect/server/api/events.py
44 45 46 47 48 49 50 51 52 53 54 |
|
read_account_events_page(request, page_token=Depends(verified_page_token), db=Depends(provide_database_interface))
async
Returns the next page of Events for a previous query against the given Account, and the URL to request the next page (if there are more results).
Source code in src/prefect/server/api/events.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
read_events(request, filter=Body(None, description='Additional optional filter criteria to narrow down the set of Events'), limit=Body(INTERACTIVE_PAGE_SIZE, ge=0, le=INTERACTIVE_PAGE_SIZE, embed=True, description='The number of events to return with each page'), db=Depends(provide_database_interface))
async
Queries for Events matching the given filter criteria in the given Account. Returns the first page of results, and the URL to request the next page (if there are more results).
Source code in src/prefect/server/api/events.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
stream_events_in(websocket)
async
Open a WebSocket to stream incoming Events
Source code in src/prefect/server/api/events.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
stream_workspace_events_out(websocket)
async
Open a WebSocket to stream Events
Source code in src/prefect/server/api/events.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|