We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

Advertisement REST API

This API exposes operations to allow management of Ads within the Cxense Advertising platform.

This API can be accessed by users with the appropriate permissions to manage Ads and supports the following combination of operations on Ad domain objects:

Object

Supported operations

Ad list

GET

Ad

POST, GET, PUT and DELETE

Retrieving the list of Ads under a Campaign

The GET operation is supported for listing existing Ads.

GET

Retrieve all of the Ads saved under the Campaign with the given campaignId.

https://{cxadbaseurl}/api/secure/ads/{campaignId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • campaignId the id of the Campaign for which the Ads are to be retrieved

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X GET https://cxad.cxense.com/api/secure/ads/0000000000039306

Individual Ads

The POST, GET, PUT and DELETE operations are supported for management of individual Ads.

POST

Create a new Ad under the Campaign with the given campaignId.

https://{cxadbaseurl}/api/secure/ad/{campaignId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • campaignId the id of the Campaign under which the new Ad is to be created

This XML example shows the contents required to be supplied for a POST call:

<?xml version="1.0" encoding="UTF-8"?>
<cx:ad xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:name>Test Advertisement</cx:name>
</cx:ad>

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X POST https://cxad.cxense.com/api/secure/ad/0000000000039306 -d @input.xml

GET

Retrieve the Ad with the given adId

https://{cxadbaseurl}/api/secure/ad/{adId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • adId the id of the Ad to be retrieved

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X GET https://cxad.cxense.com/api/secure/ad/0000000000039308

PUT

Update the Ad with the given adId

https://{cxadbaseurl}/api/secure/ad/{adId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • adId the id of the Ad to be updated

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X PUT https://cxad.cxense.com/api/secure/ad/0000000000039308 -d @input.xml

DELETE

Delete the Ad with the given adId

https://{cxadbaseurl}/api/secure/ad/{adId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • adId the id of the Ad to be deleted

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X DELETE https://cxad.cxense.com/api/secure/ad/0000000000039308


Last updated: