+.. _appc_api_guide:
+
============================================
ONAP Application Controller (APPC) API Guide
============================================
Revision History
-----------------
+================
+--------------+------------+---------------+--------------------------------------------------------+
| Date | Revision | Author | Changes |
| 2017-02-06 | 1.0.0 | mjf | copyright updated |
+--------------+------------+---------------+--------------------------------------------------------+
-|
+
Introduction
============
The client library supports both synchronous and asynchronous flows as follows.
-**Asynchronous Flow**
+Asynchronous Flow
+^^^^^^^^^^^^^^^^^
- The APPC Client Library is called via an asynchronous API using a full command object, which is mapped to a JSON representation.
- The APPC client calls the UEB/DMaaP client and sends the JSON command to a configured topic.
- The APPC client pulls response messages from the configured topic.
- On receiving the response for the command, APPC client runs the relevant callback method of the consumer ResponseHandler.
-**Synchronous Flow**
+Synchronous Flow
+^^^^^^^^^^^^^^^^
- The APPC Client Library is called via a synchronous API using a full command object, which is mapped to a JSON representation.
- The APPC client calls the UEB/DMaaP client and sends the JSON command to a configured topic.
The LCM API general request format is applicable for both POST HTTP API and for the message body received via the EUB/DMaaP bus.
LCM Request
------------
+^^^^^^^^^^^
The LCM request comprises a common header and a section containing the details of the LCM action.
The LCM request conforms to the following structure::
LCM Response
-------------
+^^^^^^^^^^^^
The LCM response comprises a common header and a section containing the payload and action details.
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
Audit Response
---------------
+^^^^^^^^^^^^^^
The audit response returns an indication of success or failure of the audit. If a new configuration is uploaded to the APPC database, the payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ECOMP Data Router bus which may be received by an external configuration storage system.
+------------------------------+--------------------------------------------------------+
CheckLock Response
-------------------
+^^^^^^^^^^^^^^^^^^
The CheckLock command returns a customized version of the LCM
response.
Configure Response
-------------------
+^^^^^^^^^^^^^^^^^^
The Configure response returns an indication of success or failure of the request. If successful, the return payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ECOMP Data Router bus which may be received by an external configuration storage system.
A failed Configure action returns a failure response and the specific failure message in the response block.
ConfigModify Response
----------------------
+^^^^^^^^^^^^^^^^^^^^^
The ConfigModify response returns an indication of success or failure of the request. If successful, the return payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ECOMP Data Router bus which may be received by an external configuration storage system.
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
ConfigBackup Response
----------------------
+^^^^^^^^^^^^^^^^^^^^^
The ConfigBackup response returns an indication of success or failure of the request.
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
ConfigRestore Response
-----------------------
+^^^^^^^^^^^^^^^^^^^^^^
The ConfigRestore response returns an indication of success or failure of the request.
+---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
Snapshot Response
------------------
+^^^^^^^^^^^^^^^^^
The Snapshot command returns an extended version of the LCM response.
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
StartApplication Response
--------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^
The StartApplication response returns an indication of success or failure of the request.
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
StopApplication Response
-------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^
The StopApplication response returns an indication of success or failure of the request.