Send Requests

Use the following guidelines when sending requests using the OHTR REST API.

URL Structure

Access the OHTR REST resources using the following URL structure:
https://<subdomain>.<domain>.com:<port>/<resource-path>
Where:
  • <subdomain.domain>.com:<port> – Host and port where OHTR is running.

  • <resource-path> – Relative path that defines the resource. For a complete list of REST endpoints, see All REST Endpoints.

Supported Methods

You can perform basic CRUD operations (create, read, update, and delete) on the OHTR instances using standard HTTP method requests, as summarized in the following table.

HTTP Method Description
GET Retrieve information about the specified resource.
HEAD Retrieve header information about the specified resource..
POST Submits data to be processed to a specified resource.
PUT Update the data.
DELETE Delete the specified resource.

Media Types

The following media types are supported by the REST API:

  • application/json

  • application/xml

Supported Headers

The OHTR REST API supports the following headers that may be passed in the header section of the HTTP request or response as needed.

Header Description Example
Accept-Encoding List of acceptable encodings to support compression. Accept-Encoding: gzip
Content-Encoding List of acceptable encodings to support compression. Content-Encoding: deflate
Content-Type Media type of the body of the request. Required for POSTand PUT requests. Content-Type: application/json
Authorization Basic authentication value. This header is common to all APIs and must be set for every request.  
X-Requested-By This is required for Cross-Site Request Forgery (CSRF) validation X-Requested-By : TRC
Accept Is required and denotes the content type that is acceptable for a response Accept: application/xml

Compression

Use compression on the OHTR REST resource request and response for improved performance. To use compression, include one of the following HTTP headers in the request: Accept-Encoding or Content-Encoding.