Create | Update Site

Creates or updates Site based on whether or not Site ID was provided.

Requires ALL or SHARED level on CREATE/UPDATE permission for INVENTORY items. When SHARED level being used, share of type CAN_EDIT or IS_OWNER must be present between requester and entity being requested.

URL:

Create: /rest-api/sites/update.do

or

Update: /rest-api/sites/{siteid}/update.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.
  • createDefaultZone – defines whether to create a default Zone within the Site or not; boolean value (optional).
  • name – Site Name. Mandatory for Create method; Optional for Update method.
  • url – Site URL (mandatory).
  • description – Short Site description.
  • email – contact Email (mandatory).
  • allowPlacementBannersLinkingChange – defines whether user can link Banners and Placements of this Site himself; boolean value (optional).
  • categoryId – IDs of categories for this Site (mandatory).
  • revenueShare – value between 0 and 100 to represent Revenue Share percentage for a given Site (optional).
  • impressionsByMonth – estimated value for Impressions served monthly(optional). Available values: LESS_THAN_100K, _100K_1_MILLION, _1_MILLION_50_MILLION, _50_MILLION_100_MILLION, _100_PLUS_MILLION, NOT_YET_LAUNCHED, DONT_KNOW.
  • visitorsByMonth – estimated value for the number of unique Site visitors monthly (optional). Available values: LESS_THAN_100K, _100K_1_MILLION, _1_MILLION_50_MILLION, _50_MILLION_100_MILLION, _100_PLUS_MILLION, NOT_YET_LAUNCHED, DONT_KNOW.
  • active - true/false.

Delete Site

Deletes the Site with given ID.

Requires ALL or SHARED level of the DELETE permission for INVENTORY items. When SHARED level is used, share type IS_OWNER or CAN_EDIT must be assigned to the requester and the requested entity.

URL: /rest-api/sites/{siteId}/delete.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.

Get Sites

Get the list of all Sites referring to a given user account.

Requires ALL or SHARED level on VIEW permission for INVENTORY items. When SHARED level being used, share of any type must be present between requester and entity being requested.

URL: /rest-api/sites.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.
  • basicInfo – returns basic information for the sites; true/false(default).
  • publishingCategories – IDs of Inventory categories to filter results (optional, comma–separated).

Get Sites, Zones and Placements

Get the list of all Sites of given user account with Zones and Placements

Requires ALL or SHARED level on VIEW permission for INVENTORY items.
When SHARED level being used, share of any type must be present between requester and
entity being requested

URL: /rest-api/sites-tree.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:
200 OK

[{"id":1,"name":"First Site", "zones":[...,"placements":[...]]},...]

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used in hash generation.
  • username – the given username.
  • publishingCategories – IDs of Inventory categories to filter the results (optional, comma–separated).

Get Site Zones

Get the list of all Zones for a given Site.

Requires ALL or SHARED level on VIEW permission for INVENTORY items. When SHARED level being used, share of any type must be present between requester and entity being requested.

URL: /rest-api/sites/{siteId}/zones.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Request parameters:

  • SAMPLE.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.

Get Publishing Categories

Receive the list of all configured Inventory categories.

URL: /rest-api/categories/publishing.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.

Get Site Bid Floor Information

Returns Bid Floor information for the given Site ID. Requires Read level permission for INVENTORY permission.

URL: /rest-api/bid-floor/site/{siteId}.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 – permission violation.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.

Create or Update Site Bid Floor

Sets or updates Bid Floor for the given Site ID. Requires Enabled permission for INVENTORY and BID FLOOR MANAGEMENT permissions.

URL: /rest-api/bid-floor/site/{siteId}/update.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 – permission violation.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.
  • country – ISO country code.
  • bidFloor – bid floor value (double).

Delete Site Bid Floor

Deletes Bid Floor for the given Site ID. Requires Enabled permission for INVENTORY and BID FLOOR MANAGEMENT permissions.

URL: /rest-api/bid-floor/site/{siteId}/delete.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 – permission violation.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.
  • country – ISO country code.

Get Security Settings for Site

Get security settings for the Site with given ID.

URL: /rest-api/security-settings/site.do
Method: GET
Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:

200 OK
[{"id":1,"name":"Kids & Teens"},{"id":2,"name":"News"}, ... ] { "forensiqSettings": {"trafficShare": 5, "trafficQualityFiltering": "ACCEPT_ALL", "dateTo": { "formatted": "16/08/2016", "timestamp": 1471294800000 }, "countries": ["UA", "US"], ..., "mediaScannerSettings": { "mediaScannerEndDate": { "formatted": "16/08/2016", "timestamp": 1471294800000 }, "mediaScannerRate": 24, ... }

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used in hash generation.
  • username – the given username.
  • id – Site ID.

Update Security Settings for Site

Update Security Settings for the Site with given ID.

URL: /rest-api/security-settings/site/save.do
Method: POST
Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Request example:

{
"mediaScannerOn": true, "mediaScannerStartDate": "2016-07-27", "mediaScannerEndDate": "2016-08-16", "mediaScannerRate": "24",
"forensiqOn": true, "countries": ["UA","US"],"dateFrom": "2016-07-27", "dateTo": "2016-08-16", "trafficQualityFiltering": "ACCEPT_ALL", "trafficShare": "5.0", "trafficQualityMaxRisk": "50"
}

Response sample:
200 OK
{ "success" : true }

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used in hash generation.
  • username – the given username.
  • id – Site ID.
  • mediaScannerOn – (required) enable/disable media scanner settings; boolean.
  • mediaScannerStartDate – (required) start date for media scanner in yyyy-MM-dd format.
  • mediaScannerEndDate – (required) end date for media scanner in yyyy-MM-dd format.
  • mediaScannerRate – (required) media scanner rate.
  • forensiqOn – (required) enable/disable forensiq; boolean.
  • countries – (optional) array of country codes.
  • adEvents – (optional) array of ad events to set. Available values: REQUEST, IMPRESSION, CLICK, ACTION.
  • dateFrom – (required) start date for forensiq in yyyy-MM-dd format.
  • dateTo – (required) end date for forensiq in yyyy-MM-dd format.
  • trafficQualityFiltering – (required) traffic quality filtering. Available values: ACCEPT_ALL, REJECT_HIGH_RISK, REJECT_SUSPICIOUS or REJECT_CUSTOM.
  • trafficShare – (required) traffic share as a double.
  • trafficQualityMaxRisk – (required) traffic share as integer.

Disable Security Settings for Site

Disables all security settings for the Site with given ID.

URL: /rest-api/security-settings/site/disable.do
Method: POST

Error codes:

  • 401 Unauthorized – authentication error.

Response format: application/json

Response sample:
200 OK
{ "success": true }

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used in hash generation.
  • username – the given username.
  • id – site ID.

Need more help?

Should you require any additional help with our solutions, do not hesitate to contact Epom technical support at support@epom.com. Our support managers are dedicated to resolving any issues and providing you with solutions and support if you face difficulties or have questions.