Events handler¶
Module with events handlers.
- class luna_events.app.handlers.events_handler.DescriptorContentType(value)¶
An enumeration.
- class luna_events.app.handlers.events_handler.EventDescriptorsHandler(request)¶
Event descriptors handler.
Resource: “/{api_version}/events/{eventId}/descriptor”
- async get(eventId)¶
Get event descriptors. See spec_get_event_descriptor.
- Return type:
HTTPResponse
- Returns:
response with event descriptor
- class luna_events.app.handlers.events_handler.EventHandler(request)¶
Handler for /events/{event_id} url.
- async get(eventId)¶
Get elementary event. See spec_get_event.
- Return type:
HTTPResponse
- Returns:
response with event
- async head(eventId)¶
Check event existence. See spec_check_event.
- Return type:
HTTPResponse
- Returns:
response with 200 status code if event exists otherwise 404
- async patch(eventId)¶
Update the event. See spec_patch_event.
- Return type:
HTTPResponse
- Returns:
response with status code 204 if the event was successfully updated
- class luna_events.app.handlers.events_handler.EventsHandler(request)¶
Events handler.
Resource: “/{api_version}/events”
- async delete()¶
Delete events. See spec_delete_events.
- Returns:
response with list of deleted events attributes and samples
- async get()¶
Get elementary events. See spec_get_events.
- Return type:
HTTPResponse
- Returns:
response with events
- async post()¶
Create elementary events. See spec_create_events.
- Return type:
HTTPResponse
- Returns:
response with event save result
- class luna_events.app.handlers.events_handler.EventsStatsHandler(request)¶
Event statistics handler.
Resource: “/{api_version}/events/stats”
- async post()¶
Get statistics on elementary events. See spec_get_event_stats.
- Return type:
HTTPResponse
- Returns:
response with event statistic
- Raises:
VLException(Error.InvalidInputJson) if failed to validate input json –
- class luna_events.app.handlers.events_handler.EventsWithoutAttributesCountHandler(request)¶
Events handler.
Resource: “/{api_version}/events/attributes/missing/count”
- async get()¶
Get elementary events with samples. See spec_get_events_missing_count.
- Return type:
HTTPResponse
- Returns:
response with number of events
- class luna_events.app.handlers.events_handler.EventsWithoutAttributesHandler(request)¶
Events handler.
Resource: “/{api_version}/events/attributes/missing”
- async get()¶
Get elementary events with samples. See spec_get_events_missing.
- Return type:
HTTPResponse
- Returns:
response with events