REST Python Module

CherryPy module containing classes for rest interface.

class pacifica.notifications.rest.EventMatch[source]

CherryPy EventMatch endpoint.

classmethod DELETE(event_uuid)[source]

Delete the event by uuid.

classmethod GET(event_uuid=None)[source]

Get the event ID and return it.

classmethod POST()[source]

Create an Event Match obj in the database.

classmethod PUT(event_uuid)[source]

Update an Event Match obj in the database.

static _http_get(event_uuid)[source]

Internal get event by UUID and return peewee obj.

exposed = True
json_schema = {'$ref': '#/definitions/eventmatch', 'definitions': {'eventmatch': {'properties': {'auth': {'properties': {'basic': {'properties': {'password': {'type': 'string'}, 'username': {'type': 'string'}}, 'required': ['username', 'password'], 'type': 'object'}, 'header': {'properties': {'credentials': {'type': 'string'}, 'type': {'type': 'string'}}, 'required': ['type', 'credentials'], 'type': 'object'}, 'type': {'enum': ['basic', 'header'], 'type': 'string'}}, 'required': ['type'], 'type': 'object'}, 'created': {'format': 'date-time', 'type': 'string'}, 'deleted': {'format': 'date-time', 'type': ['string', 'null']}, 'disabled': {'format': 'date-time', 'type': ['string', 'null']}, 'error': {'type': ['string', 'null']}, 'extensions': {'type': 'object'}, 'jsonpath': {'type': 'string'}, 'name': {'type': 'string'}, 'target_url': {'type': 'string'}, 'updated': {'format': 'date-time', 'type': 'string'}, 'user': {'type': 'string'}, 'uuid': {'type': 'string'}, 'version': {'type': 'string'}}, 'type': 'object'}}, 'not': {'required': ['uuid', 'user', 'created', 'updated', 'deleted', 'version']}}
class pacifica.notifications.rest.ReceiveEvent[source]

CherryPy Receive Event object.

classmethod POST()[source]

Receive the event and dispatch it to backend.

event_json_schema = {}
exposed = True
class pacifica.notifications.rest.Root[source]

CherryPy Root Object.

eventmatch = <pacifica.notifications.rest.EventMatch object>
exposed = True
receive = <pacifica.notifications.rest.ReceiveEvent object>
pacifica.notifications.rest.encode_text(thing_obj)[source]

Encode the text to bytes.

pacifica.notifications.rest.error_page_default(**kwargs)[source]

The default error page should always enforce json.

pacifica.notifications.rest.get_remote_user()[source]

Get the remote user from cherrypy request headers.