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

Video Creative Feature REST API

This API exposes operations to allow management of Video Creative features within the Cxense Advertising platform.

This API can be accessed by users with the appropriate permissions to manage Video Creative features and supports the following combination of operations on Video Creative feature domain objects:

Object

Supported operations

Video Creative feature list

GET

Video Creative feature

POST, GET, PUT and DELETE

Retrieving the list of Video Creative features saved against a Campaign or Ad

The GET operation is supported for listing existing Video Creative features.

GET

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

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad for which the Video Creative 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/videoCreatives/0000000000039306

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

<?xml version="1.0" ?>
<cx:videoCreatives xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:videoCreative>
        <cx:featureId>0000000000007ba6</cx:featureId>
        <cx:templateId>0000000000007b9e</cx:templateId>
        <cx:destinationUrl>http://www.example.com/destination</cx:destinationUrl>
        <cx:status>LIVE</cx:status>
        <cx:videos>
            <cx:video fileName="small.mp4" contentType="video/mp4">
                <cx:resourceUrl>
                    http://cdn.example.com/1d720916a831c45454925dea707d477bdd2368bc48f3715bb5464c2707ba9859.mp4
                </cx:resourceUrl>
            </cx:video>
            <cx:video fileName="small.mkv" contentType="video/x-matroska">
                <cx:resourceUrl>
                    http://cdn.example.com/1d720916a831c45454925dea707d477bdd2368bc48f3715bb5464c2707ba9859.mkv
                </cx:resourceUrl>
            </cx:video>
        </cx:videos>
    </cx:videoCreative>
    <cx:videoCreative>
        <cx:featureId>0000000000007ba7</cx:featureId>
        <cx:templateId>0000000000007b9e</cx:templateId>
        <cx:destinationUrl>http://www.example.com/destination</cx:destinationUrl>
        <cx:status>LIVE</cx:status>
        <cx:videos>
            <cx:video fileName="small.mp4" contentType="video/mp4">
                <cx:resourceUrl>
                    http://cdn.example.com/1d720916a831c45454925dea707d477bdd2368bc48f3715bb5464c2707ba9859.mp4
                </cx:resourceUrl>
            </cx:video>
            <cx:video fileName="small.mkv" contentType="video/x-matroska">
                <cx:resourceUrl>
                    http://cdn.example.com/1d720916a831c45454925dea707d477bdd2368bc48f3715bb5464c2707ba9859.mkv
                </cx:resourceUrl>
            </cx:video>
        </cx:videos>
    </cx:videoCreative>
</cx:videoCreatives>

Individual Video Creative features

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

POST

Create a new Video Creative feature under the Campaign or Ad with the given parentId.

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad under which the new Video Creative feature is to be created

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

<?xml version="1.0" ?>
<cx:createVideoCreative xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:templateId>00000000000b5527</cx:templateId>
    <cx:destinationUrl>http://new-destination-url.com/testing</cx:destinationUrl>
    <cx:videos>
        <cx:video fileName="small.mp4" contentType="video/mp4">
            <cx:videoData>
                [Base64 encoded Video file contents]
            </cx:videoData>
        </cx:video>
        <cx:video fileName="small.mkv" contentType="video/x-matroska">
            <cx:videoData>
                [Base64 encoded Video file contents]
            </cx:videoData>
        </cx:video>
    </cx:videos>
</cx:createVideoCreative>

Please refer to the attached example-video-creative-post.xml for an XML example containing Base64 encoded Video file contents.

Example command:

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

This XML example shows the contents returned from a typical POST call:

 Click to view XML example

In the event that creation of this creative will cause the Campaign or Ad to become valid this will not occur until after the sync task to propagate the uploaded binary data to the CDN has successfully run. The sysc task currently executes on the taskserver every second and can take anywhere in the order of seconds up to a couple of minutes to complete. Until such time as it has completed the Campaign/Ad will potentially continue to be considered invalid.

GET

Retrieve the Video Creative feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Video Creative feature to be retrieved

Example command:

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

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

<?xml version="1.0" ?>
<cx:videoCreative xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:featureId>0000000000007540</cx:featureId>
    <cx:templateId>000000000000836e</cx:templateId>
    <cx:destinationUrl>http://new-destination-url.com/testing</cx:destinationUrl>
    <cx:status>LIVE</cx:status>
    <cx:videos>
        <cx:video fileName="small.mp4" contentType="video/mp4">
            <cx:resourceUrl>
                http://cdn.example.com/1d720916a831c45454925dea707d477bdd2368bc48f3715bb5464c2707ba9859.mp4
            </cx:resourceUrl>
        </cx:video>
        <cx:video fileName="small.mkv" contentType="video/x-matroska">
            <cx:resourceUrl>
                http://cdn.example.com/1d720916a831c45454925dea707d477bdd2368bc48f3715bb5464c2707ba9859.mkv
            </cx:resourceUrl>
        </cx:video>
    </cx:videos>
</cx:videoCreative>


PUT

Update the Video Creative feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Video Creative feature to be updated

Example command:

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

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

<?xml version="1.0" ?>
<cx:updateVideoCreative xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:destinationUrl>http://updated-destination-url.com/</cx:destinationUrl>
    <cx:videos>
        <cx:video fileName="small.mp4" contentType="video/mp4">
            <cx:videoData>
                [Base64 encoded Video file contents]
            </cx:videoData>
        </cx:video>
        <cx:video fileName="small.mkv" contentType="video/x-matroska">
            <cx:videoData>
                [Base64 encoded Video file contents]
            </cx:videoData>
        </cx:video>
    </cx:videos>
</cx:updateVideoCreative>


DELETE

Delete the Video Creative feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Video Creative feature to be deleted

Example command:

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


Last updated: