Send Requests

Use these guidelines when sending requests using the PDC REST API.

URL Structure

Here's the URL structure for the requests:

https://hostname:port/pdc/resourcePath
where:
  • hostname is the URL for the PDC REST API server.
  • port is the port for the PDC REST API server.
  • resourcePath is the path to the endpoint, such as pricing.
For example, the URL for creating a pricing object is:
http://hostname:port/pdc/pricing

Supported Methods

You can perform create and read operations on a resource using standard HTTP/HTTPS method requests. This table shows the supported methods.

HTTP Method Description
GET Retrieve information about the resource.
CREATE Create the resource.
DELETE Delete the resource.
UPDATE Update the entire resource, replacing the original.

Media Types

The PDC REST API supports the following media types:

  • application/json

Supported Headers

The PDC REST API supports the following headers that may be passed in the header section of the HTTP/HTTPS request or response:

Header Description Example
Content-Type

Media type of the request body. This is required for POST and PUT requests.

Content-Type: application/json

Common Query Parameters

You can use the following common query parameters to limit the results returned by PDC REST API GET requests:

  • offset: The number of results to offset the response by. Used in GET requests that return a list of results.
  • limit: The maximum number of results to return. Used in GET requests that return a list of results.
  • fields: The properties to show values for in the response. Used in all GET requests. The possible values for this parameter depend on the resource being requested. All properties of the resource will still appear in the response, but their values will be null. Depending on the endpoint, values for some required properties, such as IDs, will appear regardless of this parameter.

For example, a cURL request submitted to the Get Pricing Object endpoint using all three of the above query parameters would look like this:

curl -X GET 'http://hostname:port/pdc/pricing'

If there were more than 14 usage consumption report objects in the system, the response would include objects 10 through 14, and show the values for the id and href fields.

Note:

If you submit a request to a multischema BRM system, the response includes results from each schema. In the example above, in a two-schema system, the response would consist of five results from the first schema followed by five from the second schema.