blob: e0d4f446bace3ddf409f2b016ff694d5c451fa9a [file] [log] [blame]
Pamela Dragoshb4a8ef22020-04-21 15:30:35 -04001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2
3.. _decision-api-label:
4
5Decision API
6#######################
7
8The Decision API is used by ONAP components that enforce policies and need a decision on which policy to enforce for a specific situation. The Decision API mimics closely the XACML request standard in that it supports a subject, action and resource.
9
10.. csv-table::
11 :header: "Field", "Required", "XACML equivalent", "Description"
12
13 "ONAPName", "True", "subject", "The name of the ONAP project making the call"
14 "ONAPComponent", "True", "subject", "The name of the ONAP sub component making the call"
15 "ONAPInstance", "False", "subject", "An optional instance ID for that sub component"
16 "action", "True", "action", "The action being performed"
17 "resource", "True", "resource", "An object specific to the action that contains properties describing the resource"
18
19It is worth noting that we use basic authorization for API access with username and password set to *healthcheck* and *zb!XztG34* respectively.
20Also, the new APIs support both *http* and *https*.
21
22For every API call, the client is encouraged to insert an uuid-type requestID as parameter. It is helpful for tracking each http transaction
23and facilitates debugging. Most importantly, it complies with Logging requirements v1.2. If the client does not provide the requestID in the API call,
24one will be randomly generated and attached to the response header *x-onap-requestid*.
25
26In accordance with `ONAP API Common Versioning Strategy Guidelines <https://wiki.onap.org/display/DW/ONAP+API+Common+Versioning+Strategy+%28CVS%29+Guidelines>`_,
27in the response of each API call, several custom headers are added::
28
29 x-latestversion: 1.0.0
30 x-minorversion: 0
31 x-patchversion: 0
32 x-onap-requestid: e1763e61-9eef-4911-b952-1be1edd9812b
33
34x-latestversion is used only to communicate an API's latest version.
35
36x-minorversion is used to request or communicate a MINOR version back from the client to the server, and from the server back to the client.
37
38x-patchversion is used only to communicate a PATCH version in a response for troubleshooting purposes only, and will be provided to the client on request.
39
40x-onap-requestid is used to track REST transactions for logging purpose, as described above.
41
42.. swaggerv2doc:: swagger.json
43
44
45End of Document