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