Update ACM documentation for Kohn release
[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 .. swaggerv2doc:: swagger/acm-comissioning.json
23
24
25 Instantiation API
26 =================
27
28 The instantiation API has two functions:
29
30 #. Creation, Reading, Update, and Deletion of Automation Composition Instances.
31 #. Instantiation and lifecycle management of Automation Composition Instances on participants.
32
33 The Instantiation API is used by the CLAMP GUI.
34
35 Instantiation Automation Composition Instance CRUD
36 --------------------------------------------------
37
38 This sub API allows for the creation, read, update, and deletion of Automation Composition
39 Instances. The endpoints for create and update take a JSON body that describes the Automation
40 Composition Instance. The endpoints for read and delete take a Automation Composition Instance
41 ID to determine which Automation Composition Instance to act on. For the delete endpoint, a check
42 is made to ensure that the Automation Composition Instance is not instantiated on participants.
43
44 A call to the update endpoint for a Automation Composition Instance follows the semantics described
45 here: :ref:`4.1 Management of Automation Composition Instance Configurations
46 <management-acm-instance-configs>`.
47
48 .. swaggerv2doc:: swagger/acm-instantiation.json
49
50
51 Instantiation Automation Composition Instance Lifecycle Management
52 ------------------------------------------------------------------
53
54 This sub API is used to manage the lifecycle of Automation Composition Instances. An Automation
55 Composition Instance can be in the states described here: :ref:`2.1 Automation Composition Instance
56 States <acm-instance-states>`. Managing the lifecycle of an Automation Composition Instance amounts
57 to steering the Automation Composition through its states.
58
59 The sub API allows upgrades and downgrades of Automation Composition Instances to be pushed to
60 participants following the semantics described here: :ref:`4.1 Management of Automation Composition
61 Instance Configurations <management-acm-instance-configs>`. When the API is used to update the
62 participants on a Automation Composition Instance, the new/upgraded/downgraded definition of the
63 Automation Composition is pushed to the participants. Note that the API asks the participants in an
64 Automation Composition Instance to perform the update, it is the responsibility of the participants
65 to execute the update and report the result using the protocols described here: :ref:`CLAMP
66 Participants <clamp-acm-participants>`. The progress and result of an update can be monitored
67 using the :ref:`Monitoring API <monitoring-api>`.
68
69 The sub API also allows a state change of an Automation Composition Instance to be ordered. The
70 required state of the Automation Composition Instance is pushed to participants in an Automation
71 Composition Instance using the API. Note that the API asks the participants in an Automation
72 Composition Instance to perform the state change, it is the responsibility of the participants to
73 execute the state change and report the result using the protocols described here: :ref:`CLAMP
74 Participants <clamp-acm-participants>`. The progress and result of a state change can be monitored
75 using the `Monitoring API <monitoring-api>`.
76
77 .. warning::
78    The Swagger for the Instantiation Lifecycle Management API will appear here.
79
80 .. _monitoring-api:
81
82 Monitoring API
83 ==============
84
85 The Monitoring API allows the state and statistics of Participants, Automation Composition
86 Instances and their Automation Composition Elements to be monitored. This API is used by the CLAMP
87 GUI. The API provides filtering so that specific Participants and Automation Composition Instances
88 can be retrieved. In addition, the quantity of statistical information to be returned can be
89 scoped.
90
91 .. swaggerv2doc:: swagger/acm-monitoring.json
92
93 Pass Through API
94 ================
95
96 This API allows information to be passed to Automation Composition Elements in an Automation
97 Composition.
98
99 .. warning::
100    The requirements on this API are still under discussion.
101
102 .. warning::
103    The Swagger for the Pass Through API will appear here.
104
105
106 End of Document