Website Management

Note: in versions of Revive Adserver and OpenX Source prior to version 2.8, the term Publisher was used where we now see the word Website. For backward compatibility, we have decided to retain the word publisher in the API.

getPublisherListByAgencyID

Description: Get existing publishers by providing the agency ID

Implementation: URL/pub/agc/[agencyId]

Note: starting with v4.1.0, this method returns an unnamed array of all publishers (websites) (breaking changes).

Method: GET

Json example

Method: 
    GET http://api.example.com/pub/agc/2

getPublisher

Description: Get existing publisher

Implementation:

URL/pub/[publisherId]

Method: GET

Json example

Method: 
    GET http://api.example.com/pub/4

addPublisher

Description: Add new publisher

Implementation: URL/pub/new

Method: POST/PUT

Requested parameters

addPublisher
Name Description: Allowed Values Required / Optional Default
agencyId agency ID int required
publisherName name of the publisher string required null
website URL of the publisher string required null
contactName contact name phone number required null
emailAddress email address string required null

Json example

Method: 
    POST http://api.example.com/pub/new
Request Header:
    Content-Type:text/javascript
Request Body:
    {
        "agencyId":1,
        "publisherName":"Testing new publisher creation",
        "website": "http:\/\/www.example.com",
        "contactName":"John Doe",
        "emailAddress":"john.doe@example.com"
    }

Starting with v4.0, the addPublisher function will return full details of the newly created website/publisher, instead of just {“OK”}. This enables developers to quickly retrieve the ID of the newly created entity, and to check the default values assigned to attributes that were not included in the call to create the new entity.


modifyPublisher

Description: Modify existing publisher

Implementation: URL/pub/[publisherId]

Method: POST/PUT

Requested parameters

modifyPublisher
Name Description: Allowed Values Required / Optional Default
agencyId agency ID int optional null
publisherName name of the publisher string optional null
website URL of the website string optional null
contactName contact name phone number optional null
emailAddress email address string optional null

Json example

Method: 
    POST http://api.example.com/pub/4
Request Header:
    Content-Type:text/javascript
Request Body:
    {
        "publisherName":"Testing publisher modification - modified",
        "website": "http:\/\/www.example.com",
        "contactName":"John Doe - modified",
        "emailAddress":"john.doe@example.com"
    }

deletePublisher

Description: Delete existing publisher

Implementation: URL/pub/[publisherId]

Method: DELETE

Json example

Method: 
    DELETE http://api.example.com/pub/4

Current version

The most recently released version of the Revive Adserver REST API is v4.2.0 (publication date July 12, 2017).

See Release Notes

Compatibility

Revive Adserver REST API is compatible with all versions of Revive Adserver v4.0 and higher. It may also be compatible with Revive Adserver v3.x (and also with OpenX Source v2.8 and higher), but this can not be guaranteed.

Revive Adserver REST API is compatible with all supported versions of PHP, including PHP7.

Also see Technical Requirements, Product Content, and Installation Instructions.

Our Recent Tweets