Website Management

Documentation for all functionality to manage websites using the Revive Adserver REST API (get a list of publishers, get one publisher, add a publisher, modify a publisher, delete a publisher).

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 a list of all publishers by providing the agency ID

Implementation: URL/pub/agc/[agencyId]Method: GET

Json example

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

Response example

[
    {
        "publisherId": "1",
        "accountId": "4",
        "agencyId": "1",
        "publisherName": "Demo Website",
        "contactName": "Demo Website",
        "emailAddress": "noreply@reviveadserverrestapi.com",
        "website": "https:\/\/www.reviveadserverrestapi.com\/",
        "comments": ""
    },
    {
        "publisherId": "2",
        "accountId": "5",
        "agencyId": "1",
        "publisherName": "Demo zone types",
        "contactName": "Revive Adserver REST API team",
        "emailAddress": "noreply@reviveadserverrestapi.com",
        "website": "https:\/\/www.reviveadserverrestapi.com\/",
        "comments": ""
    },
    {
        "publisherId": "3",
        "accountId": "6",
        "agencyId": "1",
        "publisherName": "Demo Conversion Site",
        "contactName": "Revive Adserver REST API",
        "emailAddress": "info@reviveadserverrestapi.com",
        "website": "https:\/\/www.reviveadserverrestapi.com\/",
        "comments": ""
    },
    {
        "publisherId": "4",
        "accountId": "7",
        "agencyId": "1",
        "publisherName": "Demo Statistics Website",
        "contactName": "Revive Adserver REST API",
        "emailAddress": "info@reviveadserverrestapi.com",
        "website": "https:\/\/www.reviveadserverrestapi.com\/",
        "comments": ""
    }
]

Notes

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

getPublisher

Description: Get existing publisher

Implementation:

URL/pub/[publisherId]Method: GET

Json example

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

Response example

{
    "publisherId": "1",
    "accountId": "4",
    "agencyId": "1",
    "publisherName": "Demo Website",
    "contactName": "Demo Website",
    "emailAddress": "noreply@reviveadserverrestapi.com",
    "website": "https:\/\/www.reviveadserverrestapi.com\/",
    "comments": ""
}

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":"New publisher",
    "website": "https:\/\/www.example.com\/",
    "contactName":"John Doe",
    "emailAddress":"john.doe@example.com"
 }

Response example

{
    "publisherId": 5,
    "accountId": 10,
    "agencyId": 1,
    "publisherName": "New publisher",
    "contactName": "John Doe",
    "emailAddress": "john.doe@example.com",
    "website": "https:\/\/www.example.com\/",
    "comments": null
}

Notes

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/5
Request Header:
    Content-Type:text/javascript
Request Body:
    {
        "publisherName":"Modified Publisher",
        "contactName":"Jane Doe",
        "emailAddress":"jane.doe@example.com"
    }

Response example:

{
    "publisherId": 5,
    "accountId": 10,
    "agencyId": 1,
    "publisherName": "Modified Publisher",
    "contactName": "Jane Doe",
    "emailAddress": "jane.doe@example.com",
    "website": "https:\/\/www.example.com\/",
    "comments": ""
}

deletePublisher

Description: Delete existing publisher

Implementation: URL/pub/[publisherId]

Method: DELETE

Json example

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

Response example

{"OK"}

Current version

The most recently released version of the Revive Adserver REST API is v5.1.0 (publication date April 15, 2022).

See Release Notes

Compatibility

Revive Adserver REST API is compatible with all versions of Revive Adserver v4.x, and v5.x. 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 PHP 7 and PHP  8.

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