Control Panel User Manual

Sizes :: Query API Module

Query

Description

Allows you to query for a list of sizes using search criteria. A complete list of all existing sizes will be returned if no search criteria is specified. Multiple search criteria may be specified together in the same query.

Module URI

Hyperlink /servlet/control/api/sizes/query

Parameters

Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
secretStringYesa78bf24c5a23581aceba1c5f51ac4cad Must be a String containing no more than 32 characters
outputStringNoxml Must be a String equal to either json or xml
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
idIntegerNo123 Must be the ID# of an existing size
nameStringNoJumbo Banner Must be a String containing no more than 80 characters
widthIntegerNo728 Must be an Integer between 1 and 9,999
heightIntegerNo90 Must be an Integer between 1 and 9,999
notesStringNoN/A Must be a String containing no more than 65,535 characters
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
default_imageURLNohttp://example.com/banner.gif Must be a HTTP or HTTPS URL containing no more than 1,024 characters
default_redirectURLNohttp://example.com/ Must be a HTTP or HTTPS URL containing no more than 1,024 characters
default_borderIntegerNo0 Must be an Integer between 0 and 999
default_hspaceIntegerNo0 Must be an Integer between 0 and 999
default_vspaceIntegerNo0 Must be an Integer between 0 and 999
default_alignStringNoright Must be a String equal to one of the following values:
  • top
  • middle
  • bottom
  • left
  • right
May also be left empty for default or inherited alignment
default_targetStringNo_blank Must be a String containing no more than 16 characters
default_altStringNoClick Here! Must be a String containing no more than 128 characters
default_textlinkStringNoThis text will appear as a link below the banner. Must be a String containing no more than 128 characters
default_htmlHTMLNoN/A Must be HTML or XHTML code containing no more than 65,535 characters
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
compatibleIntegerNo0 Must be the ID# of an existing size

XML Response

Hyperlink /servlet/control/api/sizes/query?secret=(key)&name=banner


<results>
  <size id="15" name="Full Banner" width="468" height="60">
    <notes>IAB Standard Size</notes>
    <default image="http://adserver.example.com/servlet/files/15" redirect="http://www.example.com/" border="0" hspace="0" vspace="0" align="" target="_top" alt="Click Here!" textlink="">
      <html><![CDATA[<a href="http://www.example.com/" target="_blank"><img src="http://adserver.example.com/servlet/files/15" border=0></a>]]></html>
    </default>
    <compatible/>
  </size>
  <size id="19" name="Jumbo Banner" width="728" height="90">
    <notes>IAB Standard Size</notes>
    <default image="http://adserver.example.com/servlet/files/16" redirect="http://www.example.com/" border="0" hspace="0" vspace="0" align="" target="_top" alt="Click Here!" textlink="">
      <html/>
    </default>
    <compatible>
      <id>15</id>
      <id>21</id>
    </compatible>
  </size>
  <size id="21" name="Tall Banner" width="392" height="72">
    <notes/>
    <default image="http://adserver.example.com/servlet/files/14" redirect="http://www.example.com/" border="0" hspace="0" vspace="0" align="" target="_top" alt="Click Here!" textlink="">
      <html/>
    </default>
    <compatible/>
  </size>
</results>

JSON Response

Hyperlink /servlet/control/api/sizes/query?secret=(key)&output=json&name=banner


{
  "results": [
    {
      "id": 15,
      "name": "Full Banner",
      "width": 468,
      "height": 60,
      "notes": "IAB Standard Size",
      "default": {
        "image": "http://adserver.example.com/servlet/files/15",
        "redirect": "http://www.example.com/",
        "border": 0,
        "hspace": 0,
        "vspace": 0,
        "align": "",
        "target": "_top",
        "alt": "Click Here!",
        "textlink": "",
        "html": "<a href=\"http://www.example.com/\" target=\"_blank\"><img src=\"http://adserver.example.com/servlet/files/15\" border=0><\/a>"
      }
    },
    {
      "id": 19,
      "name": "Jumbo Banner",
      "width": 728,
      "height": 90,
      "notes": "IAB Standard Size",
      "default": {
        "image": "http://adserver.example.com/servlet/files/16",
        "redirect": "http://www.example.com/",
        "border": 0,
        "hspace": 0,
        "vspace": 0,
        "align": "",
        "target": "_top",
        "alt": "Click Here!",
        "textlink": "",
        "html": ""
      },
      "compatible": [
        15,
        21
      ]
    },
    {
      "id": 21,
      "name": "Tall Banner",
      "width": 392,
      "height": 72,
      "notes": "",
      "default": {
        "image": "http://adserver.example.com/servlet/files/14",
        "redirect": "http://www.example.com/",
        "border": 0,
        "hspace": 0,
        "vspace": 0,
        "align": "",
        "target": "_top",
        "alt": "Click Here!",
        "textlink": "",
        "html": ""
      }
    }
  ]
}