Pools

Pools

Access to pools is provided to all users who have the appropriate permission in their personal account.
For getting information about pools, the following requests are provided:

The list method allows you to get a list of the pools

Request:

{site_path}/{lang}/api/pool/list

GET parameters list:

filter array Allows filtering data by all available fields
fields string Allows to select only the specified fields from all available
sort string Allows you to sort asc and desc entities by all available fields
page int Allows you to pass the page number of the list of entities

List of all available fields

id int Pool ID
name string Pool name
format int Pool size
typeIDSuperpool int Pool type ID
assignID int ID of the user responsible for pool
created_by int Pool creator's ID
updated_by int ID of the last user who edited the pool
created_at int UTC pool creation time
updated_at int UTC last edit time
typeName string Pool type
clicks int Total clicks
clicksToday int Clicks for the current day
clicksYtd int Clicks over the past day
views int Total views
viewsToday int Views for the current day
viewsYtd int Views over the past day
active boolean Pool status
Values:
  • 1 - enabled
  • 0 - disabled
tag array Tags

Response

The response is transmitted in JSON format. List of response fields:

result array List of pools based on query parameters
_links array List of navigation links. May contain the following elements:
  • self - contains a link to the current page of the list
  • first - contains a link to the first page of the list
  • last - contains a link to the last page of the list
  • prev - contains a link to the previous page of the list
  • next - contains a link to the next page of the list
_meta array Information on list navigation. Contains elements:
  • totalCount - total number of available entities considering all selected parameters
  • pageCount - the sequence number of the entity in the list that starts the current page
  • currentPage - number of the current page
  • perPage - number of entities displayed on one page

Request example:

{site_path}/{lang}/api/pool/list?filter[id][in][]=1&filter[id][in][]=2&filter[id][in][]=3&sort=name

Response example:

{
  "result": [
    {
      "id": 3,
      "name": "another pool name",
      "format": 55,
      "typeID": 2,
      "assignID": 0,
      "created_by": 1,
      "created_at": 1431594683,
      "updated_by": 906,
      "updated_at": 1527606301,
      "typeName": "banner",
      "views": "2154003124",
      "viewsToday": "0",
      "viewsYtd": "0",
      "clicks": "306212",
      "clicksToday": "0",
      "clicksYtd": "0",
      "active": "1",
      "tag": {
        "1": "sport",
        "2": "general"
      }
    },
    {
      "id": 1,
      "name": "one more pool name",
      "format": 0,
      "typeID": 1,
      "assignID": 0,
      "created_by": 0,
      "created_at": 0,
      "updated_by": 906,
      "updated_at": 1532346144,
      "typeName": "branding",
      "views": "0",
      "viewsToday": "0",
      "viewsYtd": "0",
      "clicks": "0",
      "clicksToday": "0",
      "clicksYtd": "0",
      "active": "1",
      "tag": {
        "2": "general"
      }
    },
    {
      "id": 2,
      "name": "pool name",
      "format": 0,
      "typeID": 0,
      "assignID": 0,
      "created_by": 0,
      "created_at": 185318297,
      "updated_by": 0,
      "updated_at": 1004653011,
      "typeName": null,
      "views": "3",
      "viewsToday": "0",
      "viewsYtd": "0",
      "clicks": "0",
      "clicksToday": "0",
      "clicksYtd": "0",
      "active": "0",
      "tag": {
        "1": "sport"
      }
    }
  ],
  "_links": {
    "self": {
      "href": "{site_path}/{lang}/api/pool/list?filter%5Bid%5D%5Bin%5D%5B0%5D=1&filter%5Bid%5D%5Bin%5D%5B1%5D=2&filter%5Bid%5D%5Bin%5D%5B2%5D=3&sort=name&page=1"
    }
  },
  "_meta": {
    "totalCount": 3,
    "pageCount": 1,
    "currentPage": 1,
    "perPage": 20
  }
}

The view method provides extended information about the pools

Request:

{site_path}/{lang}/api/pool/view/[id]

GET parameters list:

id int It is a required parameter. Pool nubmer
fields string Allows to select only the specified fields from all available
*Does not apply to related entity fields

List of all available fields

id int Pool ID
name string Pool name
format int Pool size
typeID int Pool type ID
assignID int ID of the user responsible for pool
created_by int Pool creator's ID
updated_by int ID of the last user who edited the pool
created_at int UTC pool creation time
updated_at int UTC last edit time
typeName string Pool type
clicks int Total clicks
clicksToday int Clicks for the current day
clicksYtd int Clicks over the past day
views int Total views
viewsToday int Views for the current day
viewsYtd int Views over the past day
active boolean Pool status
Values:
  • 1 - enabled
  • 0 - disabled
auction array Auctions
May contain:
zone array Zones related to the pool
All available zone fields you can see on this page
tag array Tags

Request example:

{site_path}/{lang}/api/pool/view/1

Response example:

{
  "id": 1,
  "name": "one more pool name",
  "format": 0,
  "typeID": 1,
  "assignID": 0,
  "created_by": 0,
  "created_at": 0,
  "updated_by": 906,
  "updated_at": 1532346144,
  "typeName": null,
  "views": "3",
  "viewsToday": "0",
  "viewsYtd": "0",
  "clicks": "0",
  "clicksToday": "0",
  "clicksYtd": "0",
  "active": "0"
  "active": 1,
  "auction": [
    {
      "type": "campaign",
      "id": "1",
      "name": "campaign name",
      "userID": "1",
      "assignID": "0",
      "chain": "0",
      "priority": "1",
      "views": "7",
      "viewsToday": "0",
      "viewsYtd": "0",
      "clicks": "0",
      "clicksToday": "0",
      "clicksYtd": "0",
      "attach_created_by": "0",
      "attach_updated_by": "0",
      "attach_created_at": "0",
      "attach_updated_at": "0",
      "attached": "1",
      "active": "1"
    }
  ],
  "zone": [
    {
      "id": "1",
      "name": "First",
      "format0": "3",
      "format1": "1",
      "format2": "55",
      "format3": "0",
      "format4": "0",
      "format5": "0",
      "chain": "0",
      "priority": "1",
      "doubleViewTime": "0",
      "deepSession": "0",
      "betweenView": "0",
      "views": "0",
      "viewsToday": "0",
      "viewsYtd": "0",
      "clicks": "0",
      "clicksToday": "0",
      "clicksYtd": "0",
      "created_by": "1",
      "updated_by": "907",
      "updated_at": "1571820197",
      "created_at": "1508851272",
      "attach_created_by": "0",
      "attach_updated_by": "906",
      "attach_created_at": "0",
      "attach_updated_at": "1532346131",
      "assignID": "0",
      "notes": "",
      "typeName": "branding",
      "attached": "1",
      "active": "1"
    }
  ],
  "tag": [
    {"id": 1, "name": "sport"},
    {"id": 2, "name": "general"},
  ]
}