Policy Offered APIs

The Policy Framework supports the public APIs listed in the links below:

Postman Environment for API Testing

The 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.

Postman Environment

Note

If you are testing on a Docker Installation use http as protocol, localhost as IP, and the values set in the export-ports.sh as PORT. More information in: Docker Installation

Postman Collection for API Testing

Postman collection for Policy Framework Lifecycle API

Postman collection for Policy Framework Administration API

Postman collection for Policy Framework Decision API

API Swagger

The standard for API definition in the RESTful API world is the OpenAPI Specification (OAS). The OAS, which is based on the original “Swagger Specification,” is being widely used in API developments.

OAS 3.0 is used to describe the API contracts, and those documents are added as a source artifacts.

Swagger Specification for Policy API

Swagger Specification for Policy PAP

Swagger Specification for Policy XACML-PDP

Swagger Specification for Policy DROOLS-PDP

Swagger Specification for Policy ACM-R

The YAML document can be also downloaded and imported in an web editor such as Editor Swagger

An “OpenApi first” approach is adopted, so starting from the Swagger document we auto-generate interfaces that are implemented in the API controllers.

Note

The Swagger document can still be extracted from the code in the API that uses Spring-Doc dependency at the endpoint “../v3/api-docs/” For Example ACM-Runtime endpoint

http://<IP>:<PORT>/onap/policy/clamp/acm/v3/api-docs