X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=docs%2Fapi%2Fapi.rst;h=17df7463af73b8d61d3b310c5bdf666fdb68da57;hb=a43eb545dded63e1f21b7f14105ae0ed093b54db;hp=273b87534348be8f8ef7f938ec2d16b2d570b82d;hpb=a174cadc174377c9c38df860d7e37b5799067bc7;p=policy%2Fparent.git diff --git a/docs/api/api.rst b/docs/api/api.rst index 273b8753..17df7463 100644 --- a/docs/api/api.rst +++ b/docs/api/api.rst @@ -5,8 +5,11 @@ .. THIS IS USED INTERNALLY IN POLICY ONLY .. _api-label: +Policy Life Cycle API +##################### + 1. Policy Life Cycle API -######################## +======================== 1.1 Overview ------------ @@ -175,22 +178,19 @@ Below is a table containing sample well-formed TOSCA compliant policies. 2. APIs exposed -############### +=============== 2.1 Global API Table -------------------- -Below is a global API table from where swagger JSON for different types of policy design API can be downloaded. +Below you can download the swagger YAML for Policy Framework Lifecycle API. +You can find *Tosca Node Template Design* and *Policy Design* operations. .. csv-table:: - :header: "API name", "Swagger JSON" + :header: "API name", "Swagger YAML" :widths: 10,5 - "Healthcheck API", ":download:`link `" - "Statistics API", ":download:`link `" - "Tosca Policy Type API", ":download:`link `" - "Tosca Policy API", ":download:`link `" - "Tosca NodeTemplate API", ":download:`link `" + "Policy Framework Lifecycle API", ":download:`link `" 2.2 API Swagger --------------- @@ -219,13 +219,22 @@ x-patchversion is used only to communicate a PATCH version in a response for tro x-onap-requestid is used to track REST transactions for logging purpose, as described above. -.. swaggerv2doc:: swagger/healthcheck-api.json - -.. swaggerv2doc:: swagger/statistics-api.json -.. swaggerv2doc:: swagger/policytype-api.json +.. csv-table:: + :header: "SWAGGER" + :widths: 10 -.. swaggerv2doc:: swagger/policy-api.json + `To view the full SWAGGER click here <./local-swagger.html>`_ + +.. note:: + Note that the context-path is not present in the document, because it is in the `application.yaml `_ + So the final url is composed by: + + .. csv-table:: + :header: "Scheme","Host","Context-Path","Path" + :widths: 3,3,3,3 + + "http","://:","/policy/api/v1/","healthcheck" 2.3 Creating MetadataSet for policy @@ -252,9 +261,8 @@ The following sample tosca policy shows the policy metadata section that maps to "apex.decisionmaker.policy", `apex.policy.decisionmaker.input.tosca.yaml `_ -The following node template Apis are introduced to handle the policy metadataSets as independent entities that can be later mapped to a tosca policy during policy creation. - -.. swaggerv2doc:: swagger/nodetemplates-api.json +`The node template Apis <./local-swagger.html#tag/Tosca-Node-Template-Design>`_ +are introduced to handle the policy metadataSets as independent entities that can be later mapped to a tosca policy during policy creation. When making a POST policy API call, the client must not only provide well-formed JSON/YAML, but also must conform to the TOSCA specification. For example. the "type" field for a TOSCA @@ -336,8 +344,8 @@ Delete version 1.0.0 of vFirewall Monitoring Policy:: 3. Policy API application configuration -####################################### +======================================= Starting from Jakarta Release policy-api is a Springboot based microservice. -The policy-api application configuration is packaged as a K8S ConfigMap object via `Policy-API OOM charts `_ +The policy-api application configuration is packaged as a K8S ConfigMap object via `Policy-API OOM charts `_