aboutsummaryrefslogtreecommitdiffstats
path: root/docs/modelingconcepts/dynamic-payload.rst
blob: a2a4cb72b879b2dd855389367f9cb7eaa6796100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts
.. This work is licensed under a Creative Commons Attribution 4.0
.. International License. http://creativecommons.org/licenses/by/4.0
.. Copyright (C) 2020 Deutsche Telekom AG.

Dynamic Payload
-------------------------------------

One of the most important API provided by the run time is to execute a CBA Package.

The nature of this API **request** and **response** is **model
driven** and **dynamic**.

Here is how the a **generic request** and **response** look like.

.. list-table::
   :widths: 50 50
   :header-rows: 1

   * - request
     - response
   * - .. code-block:: json

          {
           "commonHeader": {
              "originatorId": "",
              "requestId": "",
              "subRequestId": ""
           },
           "actionIdentifiers": {
              "blueprintName": "",
              "blueprintVersion": "",
              "actionName": "",
              "mode": ""
           },
           "payload": {
              "$actionName-request": {
                 "$actionName-properties": {
                 }
              }
           }
          }

     - .. code-block:: json
         
          {
           "commonHeader": {
              "originatorId": "",
              "requestId": "",
              "subRequestId": ""
           },
           "actionIdentifiers": {
              "blueprintName": "",
              "blueprintVersion": "",
              "actionName": "",
              "mode": ""
           },
           "payload": {
              "$actionName-response": {
              }
           }
          }

The ``actionName``, under the ``actionIdentifiers`` refers to the name of a
Workflow (see :ref:`workflow`)

The content of the ``payload`` is what is fully dynamic / model driven.

The first **top level element** will always be either
``$actionName-request`` for a request or ``$actionName-response`` for a response.

Then the **content within this element** is fully based on the
**workflow** **inputs** and **outputs**.

During the :ref:`enrichment` CDS will aggregate all the resources
defined to be resolved as input (see :ref:`node_type` -> Source -> Input), within mapping definition files
(see :ref:`artifact_type` -> Mapping), as data-type, that will then be use as type 
of an  input called ``$actionName-properties``.