1770c756729fd392c665cbdd80369c6a9c52089b
[policy/parent.git] / docs / clamp / acm / api-protocol / acm-rest-apis.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2
3 .. _acm-rest-apis-label:
4
5 REST APIs for CLAMP Automation Compositions
6 ###########################################
7
8
9 Commissioning API
10 =================
11
12 This API is a CRUD API that allows Automation Composition Type definitions created in a design
13 environment to be commissioned on the CLAMP runtime. It has endpoints that allow Automation
14 Composition Types to be created, read, updated, and deleted.
15
16 The body of the create and update end points is a TOSCA Service/Topology template that
17 defines the new or changed Automation Composition Type. The update and delete endpoints take a
18 reference to the Automation Composition Type. The incoming TOSCA is verified and checked for
19 referential integrity. On delete requests, a check is made to ensure that no Automation
20 Composition Instances exist for the Automation Composition Type to be deleted.
21
22 .. csv-table::
23    :header: "Commissioning API"
24    :widths: 10
25
26    `ACM-R Commissioning Swagger <./local-swagger.html#tag/Automation-Composition-Definition>`_
27
28
29 Instantiation API
30 =================
31
32 The instantiation API has two functions:
33
34 #. Creation, Reading, Update, and Deletion of Automation Composition Instances.
35 #. Instantiation and lifecycle management of Automation Composition Instances on participants.
36
37 The Instantiation API is used by the CLAMP GUI.
38
39 Instantiation Automation Composition Instance CRUD
40 --------------------------------------------------
41
42 This sub API allows for the creation, read, update, and deletion of Automation Composition
43 Instances. The endpoints for create and update take a JSON body that describes the Automation
44 Composition Instance. The endpoints for read and delete take a Automation Composition Instance
45 ID to determine which Automation Composition Instance to act on. For the delete endpoint, a check
46 is made to ensure that the Automation Composition Instance is not instantiated on participants.
47
48 A call to the update endpoint for a Automation Composition Instance follows the semantics described
49 here: :ref:`4.1 Management of Automation Composition Instance Configurations
50 <management-acm-instance-configs>`.
51
52 .. csv-table::
53    :header: "Instantiation API"
54    :widths: 10
55
56    `ACM-R Instantiation Swagger <./local-swagger.html#tag/Automation-Composition-Instance>`_
57
58
59 Instantiation Automation Composition Instance Lifecycle Management
60 ------------------------------------------------------------------
61
62 This sub API is used to manage the lifecycle of Automation Composition Instances. An Automation
63 Composition Instance can be in the states described here: :ref:`2.1 Automation Composition Instance
64 States <acm-instance-states>`. Managing the lifecycle of an Automation Composition Instance amounts
65 to steering the Automation Composition through its states.
66
67 The sub API allows upgrades and downgrades of Automation Composition Instances to be pushed to
68 participants following the semantics described here: :ref:`4.1 Management of Automation Composition
69 Instance Configurations <management-acm-instance-configs>`. When the API is used to update the
70 participants on a Automation Composition Instance, the new/upgraded/downgraded definition of the
71 Automation Composition is pushed to the participants. Note that the API asks the participants in an
72 Automation Composition Instance to perform the update, it is the responsibility of the participants
73 to execute the update and report the result using the protocols described here: :ref:`CLAMP
74 Participants <clamp-acm-participants>`. The progress and result of an update can be monitored
75 using the :ref:`Monitoring API <monitoring-api>`.
76
77 The sub API also allows a state change of an Automation Composition Instance to be ordered. The
78 required state of the Automation Composition Instance is pushed to participants in an Automation
79 Composition Instance using the API. Note that the API asks the participants in an Automation
80 Composition Instance to perform the state change, it is the responsibility of the participants to
81 execute the state change and report the result using the protocols described here: :ref:`CLAMP
82 Participants <clamp-acm-participants>`. The progress and result of a state change can be monitored
83 using the `Monitoring API <monitoring-api>`.
84
85 .. warning::
86    The Swagger for the Instantiation Lifecycle Management API will appear here.
87
88 .. _monitoring-api:
89
90 Monitoring API
91 ==============
92
93 The Monitoring API allows the state and statistics of Participants, Automation Composition
94 Instances and their Automation Composition Elements to be monitored. This API is used by the CLAMP
95 GUI. The API provides filtering so that specific Participants and Automation Composition Instances
96 can be retrieved. In addition, the quantity of statistical information to be returned can be
97 scoped.
98
99 .. csv-table::
100    :header: "Monitoring API"
101    :widths: 10
102
103    `ACM-R Monitoring Swagger <./local-swagger.html#tag/Participant-Monitoring>`_
104
105
106 Pass Through API
107 ================
108
109 This API allows information to be passed to Automation Composition Elements in an Automation
110 Composition.
111
112 .. warning::
113    The requirements on this API are still under discussion.
114
115 .. warning::
116    The Swagger for the Pass Through API will appear here.
117
118
119 End of Document