Testing the REST API at Runtime
To post a request, your client needs to first get the access token and add it to header.
For example, consider sr and quick are the project and instance names of an OSM cloud native instance respectively. Deploy the OSM-Extended TMF622 OpenAPI specification into OSM. Say, the version defined for the OSM-Extended TMF622 specification is v4.0.0.1.0.
The API Endpoint URL for creating
a product order resource would then be as
follows:
The cURL command would
be:http://hostname:port/orchestration/sr/quick/tmf-api/productOrderingManagement/v4.0.0.1.0/productOrder
where
hostname
and port
provide
access to the Kubernetes cluster exposed by your Ingress Controller or Load
Balancer.
curl --noproxy '*' -XPOST API-Endpoint-URL -H "Authorization:"Bearer access-token", Content-Type: application/json" --data-binary payload-json-file