Requests and responses

Requests to the OpenX API require a Content-Type header set to application/json. The response format for all requests is a JSON object and an HTTP response code.

OpenX API v4 calls use the following general patterns:

  • GET /resource_type/. List all objects or services of the specified type.

  • GET /object_type/object_UID. Retrieve information about the object specified by its UID.

  • POST /object_type. Create a new object using the values encoded in a JSON object, which must include all fields that are required for the create operation. You can make batch create requests by including multiple JSON objects.

  • PUT /object_type. Batch update operation. Requests include a set of valid JSON objects with any fields that are being changed by the update. You can optionally include unchanged data.

  • PUT /object_type/object_UID. Update the specified object with changed values specified in a JSON object. You can optionally include unchanged data.

  • DELETE /object_type. Batch delete operation, where the request includes multiple UIDs.

  • DELETE /object_type/object_UID. Delete the specified object.

The request samples in this guide use cURL (client URL request library) to send HTTP requests to access, create, and manipulate OpenX API resources.