blob: 6bf3a6bd0ebbe9ee25b68e371a2681d4a81f9b30 [file] [log] [blame]
Saryu Shah990f41d2019-08-30 04:13:06 +00001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
Pamela Dragoshd5ff9882020-05-11 15:18:01 -04003
4.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
5.. _offeredapis:
Saryu Shah990f41d2019-08-30 04:13:06 +00006
7
Pamela Dragosh22ded7e2019-10-03 08:20:42 -04008Policy Offered APIs
9===================
Saryu Shah990f41d2019-08-30 04:13:06 +000010
11The Policy Framework supports the public APIs listed in the links below:
12
Pamela Dragoshb4a8ef22020-04-21 15:30:35 -040013.. toctree::
14 :maxdepth: 1
15
16 api/api
17 pap/pap
18 xacml/decision-api
lapentafda43eb542023-03-27 13:46:04 +010019 clamp/acm/api-protocol/acm-rest-apis
Pamela Dragoshb4a8ef22020-04-21 15:30:35 -040020
Pamela Dragosh22ded7e2019-10-03 08:20:42 -040021Postman Environment for API Testing
22-----------------------------------
23
24The following environment file from postman can be used for testing API's. All you need to do is fill in the IP and Port information for the installation that you have created.
25
lapentafda43eb542023-03-27 13:46:04 +010026:download:`Postman Environment <PolicyAPI.postman_environment.json>`
27
28.. note::
lapentafdfa9ddbf2023-04-06 11:22:37 +010029 If you are testing on a Docker Installation use *http* as **protocol**, *localhost* as **IP**,
lapentafda43eb542023-03-27 13:46:04 +010030 and the values set in the `export-ports.sh <https://raw.githubusercontent.com/onap/policy-docker/master/compose/export-ports.sh>`_ as **PORT**.
lapentafdfa9ddbf2023-04-06 11:22:37 +010031 More information in: :ref:`Docker Installation <docker-label>`
Pamela Dragosh22ded7e2019-10-03 08:20:42 -040032
33Postman Collection for API Testing
34----------------------------------
35
Ram Krishna Verma68966c02020-07-21 16:19:45 -040036Postman collection for `Policy Framework Lifecycle API <https://github.com/onap/policy-api/blob/master/postman/lifecycle-api-collection.json>`_
Pamela Dragosh22ded7e2019-10-03 08:20:42 -040037
Ram Krishna Verma68966c02020-07-21 16:19:45 -040038Postman collection for `Policy Framework Administration API <https://github.com/onap/policy-pap/blob/master/postman/pap-api-collection.json>`_
39
40Postman collection for `Policy Framework Decision API <https://github.com/onap/policy-xacml-pdp/blob/master/postman/decision-api-collection.json>`_
puthuparambil.adityaa6c09a22020-07-27 12:09:40 +010041
lapentafda43eb542023-03-27 13:46:04 +010042API Swagger
43-----------
puthuparambil.adityaa6c09a22020-07-27 12:09:40 +010044
45The standard for API definition in the RESTful API world is the OpenAPI Specification (OAS). The OAS, which is based on
46the original "Swagger Specification," is being widely used in API developments.
47
lapentafda43eb542023-03-27 13:46:04 +010048OAS 3.0 is used to describe the API contracts, and those documents are added as a source artifacts.
puthuparambil.adityaa6c09a22020-07-27 12:09:40 +010049
lapentafdfa9ddbf2023-04-06 11:22:37 +010050`Swagger Specification for Policy API <./api/local-swagger.html>`_
puthuparambil.adityaa6c09a22020-07-27 12:09:40 +010051
lapentafdfa9ddbf2023-04-06 11:22:37 +010052`Swagger Specification for Policy PAP <./pap/local-swagger.html>`_
puthuparambil.adityaa6c09a22020-07-27 12:09:40 +010053
lapentafdfa9ddbf2023-04-06 11:22:37 +010054`Swagger Specification for Policy XACML-PDP <./xacml/local-swagger.html>`_
lapentafda43eb542023-03-27 13:46:04 +010055
lapentafdfb738992023-04-14 10:05:26 +010056`Swagger Specification for Policy DROOLS-PDP <./drools/local-swagger.html>`_
lapentafda43eb542023-03-27 13:46:04 +010057
lapentafdfb738992023-04-14 10:05:26 +010058`Swagger Specification for Policy ACM-R <./clamp/acm/api-protocol/local-swagger.html>`_
lapentafda43eb542023-03-27 13:46:04 +010059
60
lapentafdfa9ddbf2023-04-06 11:22:37 +010061The YAML document can be also downloaded and imported in an web editor such as `Editor Swagger <https://editor.swagger.io/>`_
lapentafda43eb542023-03-27 13:46:04 +010062
63An "OpenApi first" approach is adopted, so starting from the Swagger document we auto-generate interfaces that are implemented in the API controllers.
64
65.. note::
66 The Swagger document can still be extracted from the code in the API that uses *Spring-Doc* dependency at the endpoint "../v3/api-docs/"
67 For Example ACM-Runtime endpoint
lapentafdfa9ddbf2023-04-06 11:22:37 +010068
69 ``http://<IP>:<PORT>/onap/policy/clamp/acm/v3/api-docs``