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

Device Targeting Feature REST API

This API exposes operations to allow management of Device 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 Device Targeting feature domain objects:

Object

Supported operations

Device Targeting feature list

GET

Device Targeting feature

POST, GET, PUT and DELETE

Retrieving the list of Device Targeting features saved against a Campaign or Ad

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

GET

Retrieve all of the Device Targeting features saved at or below the Campaign or Ad with the given parentId. One call using the id of a Campaign will return all Device Targeting features stored against the Campaign and its Ads in a single response.

https://{cxadbaseurl}/api/secure/devices/{parentId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad for which the Device 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/devices/0000000000039355

 

This XML example shows the contents returned from a GET call:

<?xml version="1.0" encoding="UTF-8"?>
<cx:deviceFeatures xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:deviceFeature>
        <cx:featureId>000000000000e162</cx:featureId>
        <cx:templateId>000000000000e15b</cx:templateId>
        <cx:platforms>
            <cx:platform>TABLET</cx:platform>
        </cx:platforms>
        <cx:operatingSystems>
            <cx:os>IOS</cx:os>
        </cx:operatingSystems>
    </cx:deviceFeature>
    <cx:deviceFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
        <cx:featureId>000000000000e162</cx:featureId>
        <cx:templateId>000000000000e15b</cx:templateId>
        <cx:platforms>
            <cx:platform>PHONE</cx:platform>
        </cx:platforms>
        <cx:operatingSystems>
            <cx:os>ANDROID</cx:os>
        </cx:operatingSystems>
        <cx:brands>
            <cx:brand>HTC</cx:brand>
            <cx:brand>SAMSUNG</cx:brand>
        </cx:brands>
    </cx:deviceFeature>
</cx:deviceFeatures>

 

Individual Device Targeting features

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

POST

Create a new Device Targeting feature under the Campaign or Ad with the given parentId.

https://{cxadbaseurl}/api/secure/device/{parentId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad under which the new Device Targeting feature 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:deviceFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:templateId>000000000000e15b</cx:templateId>
    <cx:platforms>
        <cx:platform>PHONE</cx:platform>
    </cx:platforms>
    <cx:operatingSystems>
        <cx:os>ANDROID</cx:os>
    </cx:operatingSystems>
    <cx:brands>
        <cx:brand>HTC</cx:brand>
        <cx:brand>SAMSUNG</cx:brand>
    </cx:brands>
</cx:deviceFeature>

 

Example command:

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

GET

Retrieve the Device Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Device 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/device/00000000000353gg

This XML example shows the contents returned from a GET call:

<?xml version="1.0" encoding="UTF-8"?>
<cx:deviceFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:featureId>000000000000e162</cx:featureId>
    <cx:templateId>000000000000e15b</cx:templateId>
    <cx:platforms>
        <cx:platform>PHONE</cx:platform>
        <cx:platform>TABLET</cx:platform>
    </cx:platforms>
    <cx:operatingSystems>
        <cx:os>ANDROID</cx:os>
        <cx:os>IOS</cx:os>
    </cx:operatingSystems>
    <cx:brands>
        <cx:brand>APPLE</cx:brand>
        <cx:brand>SAMSUNG</cx:brand>
    </cx:brands>
</cx:deviceFeature>


PUT

Update the Device Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Device 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/device/00000000000353gg -d @input.xml

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

<?xml version="1.0" encoding="UTF-8"?>
<cx:deviceFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:templateId>000000000000e543</cx:templateId>
    <cx:platforms>
        <cx:platform>PHONE</cx:platform>
    </cx:platforms>
    <cx:operatingSystems>
        <cx:os>ANDROID</cx:os>
    </cx:operatingSystems>
    <cx:brands>
        <cx:brand>ASUS</cx:brand>
        <cx:brand>HTC</cx:brand>
        <cx:brand>SAMSUNG</cx:brand>
    </cx:brands>
</cx:deviceFeature>

 

DELETE

Delete the Device Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Device 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/device/00000000000353gg


Last updated: