blob: 731df542fabaa993aaf53574683b6cd1eeeb9f85 [file] [log] [blame]
JakobKrieg7c3f3952020-08-04 20:46:50 +02001.. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts by IBM
2.. used under Creative Commons Attribution 4.0 International License.
3.. http://creativecommons.org/licenses/by/4.0
4.. Copyright (C) 2020 Deutsche Telekom AG.
5
6Dynamic Payload
7-------------------------------------
8
9One of the most important API provided by the run time is to execute a CBA Package.
10
11The nature of this API **request** and **response** is **model
12driven** and **dynamic**.
13
14Here is how the a **generic request** and **response** look like.
15
16.. list-table::
17 :widths: 50 50
18 :header-rows: 1
19
20 * - request
21 - response
22 * - .. code-block:: json
23
24 {
25 "commonHeader": {
26 "originatorId": "",
27 "requestId": "",
28 "subRequestId": ""
29 },
30 "actionIdentifiers": {
31 "blueprintName": "",
32 "blueprintVersion": "",
33 "actionName": "",
34 "mode": ""
35 },
36 "payload": {
37 "$actionName-request": {
38 "$actionName-properties": {
39 }
40 }
41 }
42 }
43
44 - .. code-block:: json
45
46 {
47 "commonHeader": {
48 "originatorId": "",
49 "requestId": "",
50 "subRequestId": ""
51 },
52 "actionIdentifiers": {
53 "blueprintName": "",
54 "blueprintVersion": "",
55 "actionName": "",
56 "mode": ""
57 },
58 "payload": {
59 "$actionName-response": {
60 }
61 }
62 }
63
64The ``actionName``, under the ``actionIdentifiers`` refers to the name of a
65Workflow (see :ref:`workflow`)
66
67The content of the ``payload`` is what is fully dynamic / model driven.
68
69The first **top level element** will always be either
70``$actionName-request`` for a request or ``$actionName-response`` for a response.
71
72Then the **content within this element** is fully based on the
73**workflow** **inputs** and **outputs**.
74
75During the :ref:`enrichment` CDS will aggregate all the resources
76defined to be resolved as input (see :ref:`node_type` -> Source -> Input), within mapping definition files
77(see :ref:`artifact_type` -> Mapping), as data-type, that will then be use as type
78of an input called ``$actionName-properties``.