"Fossies" - the Fresh Open Source Software Archive

Member "monasca-events-api-2.0.0/api-ref/source/events.inc" (14 Oct 2020, 2258 Bytes) of package /linux/misc/openstack/monasca-events-api-2.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) fasm source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "events.inc" see the Fossies "Dox" file reference documentation.

    1 .. -*- rst -*-
    2 ..
    3       Copyright 2017 Fujitsu LIMITED
    4 
    5       Licensed under the Apache License, Version 2.0 (the "License"); you may
    6       not use this file except in compliance with the License. You may obtain
    7       a copy of the License at
    8 
    9           http://www.apache.org/licenses/LICENSE-2.0
   10 
   11       Unless required by applicable law or agreed to in writing, software
   12       distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
   13       WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   14       License for the specific language governing permissions and limitations
   15       under the License.
   16 
   17 ======
   18 Events
   19 ======
   20 
   21 Accept events send from e.g. monasca-events-agent. Events are JSON objects collected from
   22 the OpenStack message bus. Events, also called notifications, are emitted by the OpenStack Cloud core components.
   23 Monasca-events-api accepts versioned notifications according to the `OpenStack
   24 documentation <https://docs.openstack.org/nova/latest/notifications.html#versioned-notifications>`_.
   25 
   26 Send Events
   27 ===========
   28 
   29 .. rest_method:: POST /v1.0/events
   30 
   31 Accepts multiple events (i.e. bulk mode). Each event can be enriched with a set of dimensions
   32 with information about the notification service source (Nova, Glance, etc.), or the message bus source
   33 (topic name). A single event in bulk mode must also contain the project_id field which is required.
   34 Each event can be enriched with a set of dimensions. Dimensions can contain additional information,
   35 for example, about the topic from which the event was read or the hostname from which it was
   36 generated.
   37 
   38 .. rest_status_code:: success http_codes.yaml
   39 
   40     - 204
   41 
   42 .. rest_status_code:: error http_codes.yaml
   43 
   44     - 400
   45     - 401
   46     - 411
   47     - 413
   48     - 422: event_no_project
   49     - 422: event_no_event
   50     - 422: bad_envelope
   51     - 503
   52 
   53 Request
   54 -------
   55 
   56  .. rest_parameters:: parameters.yaml
   57 
   58     - events: events
   59 
   60 **Example 1: Request with a single event**
   61 
   62 .. literalinclude:: ../../doc/api-samples/v1/req_simple_event.json
   63    :language: javascript
   64 
   65 **Example 2:Request with multiple events**
   66 
   67 .. literalinclude:: ../../doc/api-samples/v1/req_multiple_events.json
   68    :language: javascript
   69 
   70 Response
   71 ========
   72 
   73 No body content is returned on successful POST.