update link to upper-constraints.txt
[dcaegen2.git] / docs / sections / apis / ves.rst
1 .. This work is licensed under a
2    Creative Commons Attribution 4.0 International License.
3    http://creativecommons.org/licenses/by/4.0
4
5 VES-Collector
6 =============
7
8 .. toctree::
9     :maxdepth: 3
10
11 Description
12 ~~~~~~~~~~~
13
14 Virtual Event Streaming (VES) Collector is RESTful collector for processing
15 JSON messages. The collector verifies the source and validates the events
16 against VES schema before distributing to DMAAP MR topics.
17
18 .. csv-table::
19    :header: "API name", "Swagger JSON", "Swagger YAML"
20    :widths: 10,5,5
21
22    "VES Collector", ":download:`link <swagger_vescollector.json>`", ":download:`link <swagger_vescollector.yaml>`"
23
24 Contact Information
25 ~~~~~~~~~~~~~~~~~~~
26
27 onap-discuss@lists.onap.org
28
29 Security
30 ~~~~~~~~
31
32 `VES Authentication Types <https://docs.onap.org/projects/onap-dcaegen2/en/latest/sections/services/ves-http/tls-authentication.html>`_
33
34
35 VES Specification
36 ~~~~~~~~~~~~~~~~~
37
38 - `VES 7.1.1 Data Model <https://docs.onap.org/projects/onap-vnfrqts-requirements/en/latest/Chapter8/ves7_1spec.html#common-event-format>`_
39 - `VES 5.4 Data Model <https://docs.onap.org/projects/onap-vnfrqts-requirements/en/latest/Chapter8/ves_5_4_1/VESEventListener.html#common-event-format>`_
40
41
42 Response Code
43 ~~~~~~~~~~~~~
44
45 +-----+--------------+--------------------------------------------------------+
46 | Code| Reason Phrase| Description                                            |
47 +=====+==============+========================================================+
48 | 202 | Accepted     | The request has been accepted for processing           |
49 +-----+--------------+--------------------------------------------------------+
50 | 400 | Bad Request  | Many possible reasons not specified by the other codes |
51 |     |              | (e.g., missing required parameters or incorrect format)|
52 |     |              | . The response body may include a further exception    |
53 |     |              | code and text. HTTP 400 errors may be mapped to SVC0001|
54 |     |              | (general service error), SVC0002 (bad parameter),      |
55 |     |              | SVC2000 (general service error with details) or PO9003 |
56 |     |              | (message content size exceeds the allowable limit).    |
57 +-----+--------------+--------------------------------------------------------+
58 | 401 | Unauthorized | Authentication failed or was not provided. HTTP 401    |
59 |     |              | errors may be mapped to POL0001 (general policy error) |
60 |     |              | or POL2000 (general policy error with details).        |
61 +-----+--------------+--------------------------------------------------------+
62 | 404 | Not Found    | The server has not found anything matching the         |
63 |     |              | Request-URI. No indication is given of whether the     |
64 |     |              | condition is temporary or permanent.                   |
65 +-----+--------------+--------------------------------------------------------+
66 | 405 | Method Not   | A request was made of a resource using a request method|
67 |     | Allowed      | not supported by that resource (e.g., using PUT on a   |
68 |     |              | REST resource that only supports POST).                |
69 +-----+--------------+--------------------------------------------------------+
70 | 500 | Internal     | The server encountered an internal error or timed out; |
71 |     | Server Error | please retry (general catch-all server-side error).HTTP|
72 |     |              | 500 errors may be mapped to SVC1000 (no server         |
73 |     |              | resources).                                            |
74 +-----+--------------+--------------------------------------------------------+
75
76 Sample Request and Response
77 ---------------------------
78
79 Request Example
80
81
82 .. code-block:: http
83
84     POST  /eventListener/v7 HTTP/1.1
85     Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
86     content-type: application/json
87     content-length: 12345
88     X-MinorVersion: 1
89
90     {
91         "event": {
92             "commonEventHeader": {
93                 "version": "4.1",
94                 "vesEventListenerVersion": "7.1.1",
95                 "domain": "fault",
96                 "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion",
97                 "eventId": "fault0000245",
98                 "sequence": 1,
99                 "priority": "High",
100                 "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
101                 "reportingEntityName": "ibcx0001vm002oam001",
102                 "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
103                 "sourceName": "scfx0001vm002cap001",
104                 "nfVendorName": "Ericsson",
105                 "nfNamingCode": "scfx",
106                 "nfcNamingCode": "ssc",
107                 "startEpochMicrosec": 1413378172000000,
108                 "lastEpochMicrosec": 1413378172000000,
109                 "timeZoneOffset": "UTC-05:30"
110             },
111             "faultFields": {
112                 "faultFieldsVersion": 4.0,
113                 "alarmCondition": "PilotNumberPoolExhaustion",
114                 "eventSourceType": "other",
115                 "specificProblem": "Calls cannot complete - pilot numbers are unavailable",
116                 "eventSeverity": "CRITICAL",
117                 "vfStatus": "Active",
118                 "alarmAdditionalInformation": {
119                     "PilotNumberPoolSize": "1000"
120                 }
121             }
122         }
123     }
124
125
126
127 Response Example
128
129 .. code-block:: text
130
131     HTTPS/1.1 202 Accepted
132     X-MinorVersion: 1
133     X-PatchVersion: 1
134     X-LatestVersion: 7.1.1