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

Site Targeting Feature REST API

This API exposes operations to allow management of Site Targeting features on Campaigns and Ads within the Cxense Advertising platform.

This API can be accessed by Advertisers and supports the following combination of operations on Site Targeting feature domain objects:

Object

Supported operations

Site Targeting feature list

GET

Site Targeting feature

POST, GET, PUT and DELETE

Retrieving all Site Targeting features for a Campaign or Ad

The GET operation is supported for listing existing Site Targeting features.

GET

Retrieve all of the Site Targeting features saved at or below the Campaign with the given campaignId.

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • campaignId the id of the Campaign for which the Site Targeting features are to be retrieved

Example command:

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

Individual Site Targeting

The POST, GET, PUT and DELETE operations are supported for management of Site Targeting features.

POST

Create a new site targeting feature under the Campaign or Ad with the given parentId.

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad under which the site targeting is to be created

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

<?xml version="1.0"?>
<cx:publisherTargeting xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:templateId>0000000000004c91</cx:templateId>
  <cx:publisherTarget>
    <cx:url>http://www.example.com</cx:url>
    <cx:targetType>POSITIVE</cx:targetType>
  </cx:publisherTarget>
  <cx:publisherTarget>
    <cx:url>http://www.not.example.com</cx:url>
    <cx:targetType>NEGATIVE</cx:targetType>
  </cx:publisherTarget>
</cx:publisherTargeting>

GET

Retrieve the Site Targeting feature with the given featureId

https://{cxadbaseurl}/api/secure/publisherTargeting/{featureId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Site Targeting feature to be retrieved

Example command:

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

PUT

Update the Site Targeting feature with the given featureId

https://{cxadbaseurl}/api/secure/publisherTargeting/{featureId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Site Targeting feature to be updated

 Example command:

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

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

<?xml version="1.0"?>
<cx:publisherTargeting xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:templateId>0000000000004c91</cx:templateId>
  <cx:publisherTarget>
    <cx:url>http://www.update.example.com</cx:url>
    <cx:targetType>POSITIVE</cx:targetType>
  </cx:publisherTarget>
  <cx:publisherTarget>
    <cx:url>http://www.not.update.example.com</cx:url>
    <cx:targetType>NEGATIVE</cx:targetType>
  </cx:publisherTarget>
</cx:publisherTargeting> 

DELETE

Delete the Site Targeting feature with the given featureId

https://{cxadbaseurl}/api/secure/publisherTargeting/{featureId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Site Targeting feature to be deleted

Example command:

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


Last updated: