monasca_log_api.api package

Submodules

monasca_log_api.api.exceptions module

exception HTTPUnprocessableEntity(message, **kwargs)[source]

Bases: falcon.http_error.OptionalRepresentation, falcon.http_error.HTTPError

HTTPUnprocessableEntity http error.

HTTPError that comes with ‘422 Unprocessable Entity’ status

Argument:message(str) - meaningful description of what caused an error
Argument:kwargs - any other option defined in falcon.OptionalRepresentation and falcon.HTTPError

monasca_log_api.api.headers module

class LogApiHeader(name, is_required)

Bases: tuple

Tuple describing a header.

is_required

Alias for field number 1

name

Alias for field number 0

monasca_log_api.api.healthcheck_api module

class HealthCheckResult(status, details)

Bases: tuple

details

Alias for field number 1

status

Alias for field number 0

class HealthChecksApi[source]

Bases: object

HealthChecks Api

HealthChecksApi server information regarding health of the API.

on_get(req, res)[source]

Complex healthcheck report on GET.

Returns complex report regarding API well being and all dependent services.

Parameters:
  • req (falcon.Request) – current request
  • res (falcon.Response) – current response
on_head(req, res)[source]

Simple healthcheck report on HEAD.

In opposite to HealthChecksApi.on_get(), this method is supposed to execute ASAP to inform user that API is up and running.

Parameters:
  • req (falcon.Request) – current request
  • res (falcon.Response) – current response

monasca_log_api.api.logs_api module

class LogsApi[source]

Bases: object

Logs API.

Logs API acts as RESTful endpoint accepting messages contains collected log entries from the system. Works as gateway for any further processing for accepted data.

on_get(req, res)[source]

Queries logs matching specified dimension values.

Performs queries on the underlying log storage against a time range and set of dimension values.

Parameters:
  • req – current request
  • res – current response
on_post(req, res)[source]

Accepts sent logs as text or json.

Accepts logs sent to resource which should be sent to kafka queue.

Parameters:
  • req – current request
  • res – current response
version

monasca_log_api.api.versions_api module

class VersionsAPI[source]

Bases: object

Versions API

VersionsAPI returns information about API itself.

on_get(req, res, version_id)[source]