Sites

Sites

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

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

Request:

{site_path}/{lang}/api/site/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 Site ID
userID int User ID
name string Site name
url string Site url
alias string Site aliases
notes string Site notes
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
created_by int Site creator's ID
updated_by int ID of the last user who edited the site
created_at int UTC site creation time
updated_at int UTC last edit time
assignID int ID of the user responsible for the site
publisher string Publisher name
iabCat int ID of the site category
active boolean Site 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 sites 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/site/list?filter[id][in][]=1&filter[id][in][]=2&filter[id][in][]=3&filter[name][like]=first&sort=name

Response example:

{
  "result": [
    {
      "id": 1,
      "userID": 2018061871,
      "name": "First",
      "url": "http",
      "alias": "firs",
      "notes": null,
      "clicks": 0,
      "clicksToday": 0,
      "clicksYtd": 0,
      "views": 17645,
      "viewsToday": 0,
      "viewsYtd": 0,
      "created_by": 1,
      "updated_by": 903,
      "updated_at": 1570018963,
      "created_at": 1508851272,
      "assignID": 0,
      "publisher": "dkc7",
      "iabCat": "1",
      "active": "1",
      "tag": {
        "1": "sport",
        "2": "general"
      }
    }
  ],
  "_links": {
    "self": {
      "href": "{site_path}/{lang}/api/site/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": 1,
    "pageCount": 1,
    "currentPage": 1,
    "perPage": 20
  }
}

The view method provides extended information about the sites

Request:

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

GET parameters list:

id int It is a required parameter. Site number
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 Site ID
userID int User ID
name string Site name
url string Site url
alias string Site aliases
notes string Site notes
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
created_by int Site creator's ID
updated_by int ID of the last user who edited the site
created_at int UTC site creation time
updated_at int UTC last edit time
assignID int ID of the user responsible for the site
publisher string Publisher name
iabCat int ID of the site category
active boolean Site status
Values:
  • 1 - enabled
  • 0 - disabled
zone array Zones related to the site
All available zone fields you can see on this page
tag array Tags

Request example:

{site_path}/{lang}/api/site/view/228

Response example:

{
  "id": 228,
  "userID": 908,
  "name": "sitename",
  "url": "https://site.link",
  "alias": "example",
  "notes": null,
  "clicks": 4821781,
  "clicksToday": 0,
  "clicksYtd": 0,
  "views": 260839884,
  "viewsToday": 0,
  "viewsYtd": 0,
  "created_by": 1,
  "updated_by": 907,
  "updated_at": 1521732464,
  "created_at": 1508851274,
  "assignID": 0,
  "publisher": "name",
  "iabCat": "1",
  "active": 0,
  "zone": [
    {
      "id": "456",
      "name": "zone name",
      "format0": "3",
      "format1": "1",
      "format2": "55",
      "format3": "0",
      "format4": "0",
      "format5": "0",
      "doubleViewTime": "0",
      "deepSession": "0",
      "betweenView": "0",
      "clicks": "26373",
      "clicksToday": "0",
      "clicksYtd": "0",
      "views": "140082553",
      "viewsToday": "0",
      "viewsYtd": "0",
      "created_by": "1",
      "updated_by": "1",
      "updated_at": "1508851274",
      "created_at": "1508851274",
      "assignID": "0",
      "notes": "",
      "typeName": "banner",
      "active": "1"
    },
    {
      "id": "3683",
      "name": "another zone name",
      "format0": "6",
      "format1": "0",
      "format2": "0",
      "format3": "0",
      "format4": "0",
      "format5": "0",
      "doubleViewTime": "0",
      "deepSession": "0",
      "betweenView": "0",
      "clicks": "0",
      "clicksToday": "0",
      "clicksYtd": "0",
      "views": "0",
      "viewsToday": "0",
      "viewsYtd": "0",
      "created_by": "906",
      "updated_by": "903",
      "updated_at": "1521803730",
      "created_at": "1521733162",
      "assignID": "0",
      "notes": "",
      "typeName": "banner",
      "active": "1"
    }
  ],
  "tag": [
    {"id": 1, "name": "sport"},
    {"id": 2, "name": "general"},
  ]
}