Requests

Once you have learned about Authentication you can start accessing Oracle Maxymiser resources via standard HTTPS requests to any of the API endpoints.

Format

An Oracle Maxymiser API request has the following format:

{HTTP Verb} {Base URL}/{API Version}/{Endpoint}

Here is an example of a valid request:

[GET] api-eu.maxymiser.com/v1/sites

Base URL

The base URL looks like this:
api-{env}.maxymiser.com
where {env} is the environment on which the REST API is running:
  • us for the US datacenter

  • eu for the European datacenter

HTTP Verbs

Since the API is based on REST principles, the API uses the appropriate HTTP verb where possible. Please note that not all verbs are valid for all endpoints. For example, a GET request for sites will retrieve a list of Maxymiser sites the authenticated user has access to, but you cannot perform a POST, PUT or DELETE requests on this endpoint.

HTTP Method Description
GET Used for retrieving Maxymiser resources.
POST Used for creating Maxymiser resources.
PUT Used for changing/replacing Maxymiser resources or collections. Resources support partial updates. Only parameters included in the request payload get updated, any unspecified parameters will remain unchanged.
DELETE Used for deleting Maxymiser resources.

Versioning

There is currently only one version of the API - v1.

Authentication

All the resources should have an Authorization request header. The header value should contain the access token obtained using from the Token api (see Authentication for more details):

Authorization: Bearer <access_token>

Example of a valid API request made with cURL:

curl --request GET \
  --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImVwajdFM3M1dkJ6bnN2TU1BeVozMkpJV3JMQSJ9.eyJzdWIiOiJyZXNwdXNlcjFAbWF4eW1pc2VyLmNvbSIsImlhdCI6MTQ2OTU0MzI4MiwiaXNzIjoiTWF4eW1pc2VyIiwiZXhwIjoxNDY5NTQ2ODgyfQ.OoaeAg2COqLxiy0TvlxrwUYQ64QoaZMYFpco5iuOZppEAKz7xZpCM9ZLMa0UrZZ5nXa1CzOFn61BKYIa11xtt_5h6JZ7mkIOPCURiZLyUnxOp_R9jILVLZ3GCvu2eO0vqgcQPZTCbANgkwK7ngL1XSfl16l4OHD3cJFvee5lFbo0KbUL7AawjGQ0w-d3KnSTc-jhSjvIC_08BOmoted3BWLCr5f2ZBQW0OGc6p0CIFsPOCYIHJZX5RBWkb1PZ9bP6W4DTTacRnLppC1eJWF28ADwkiWlyWy5eglDTZXSzpsyNgWMf8-L_JKHGqoWeUtn-k2VfHf1hg-0UNoXClgnkw" \
  https://api-eu.maxymiser.com/v1/sites

Media Types

The following media types are supported by the REST API. All POST and PUT requests should include this header and use JSON in the body of the request.

  • application/json

Headers

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

Header Description Example
Accept-Encoding List of acceptable encodings to support compression. Accept-Encoding: gzip
Authorization Token used for authentication. Authorization: Bearer eyJ0eXAiOiJKV1QiL...
Content-Encoding List of acceptable encodings to support compression. Content-Encoding: deflate
Content-Type Media type of the body of the request. Required for POST and PUT requests. Content-Type: application/json

Compression

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