GetLimits

Returns the total number of images that the client can upload, as well as the number of images that have already been uploaded or are currently in the upload queue.

Input data

The input data structure in JSON is shown below.

{
   "method": "AdImage",
   "param": {
      /* AdImageRequest */
      "Action": (string),
      "SelectionCriteria": {
         /* AdImageSelectionCriteria */
         "Logins": [
            (string)
            ...
         ]
      }
   }
}

Parameters are described below.

ParameterDescriptionRequired
AdImageRequest object
ActionAction: GetLimits.Yes
SelectionCriteriaThe AdImageSelectionCriteria object, which contains criteria for selecting usernames.For agencies
AdImageSelectionCriteria object
Logins

For agencies, an array containing the usernames of clients (no more than 1000) to get the number of images for.

For advertisers, this parameter is ignored.

For agencies

Output data

The output data structure in JSON is shown below.

{
   "data": {
      /* AdImageResponse */
      "AdImageLimits": [
         {  /* AdImageLimit */
            "Login": (string),
            "Capacity": (int),
            "Utilized": (int)
         }
         ...
      ]
   }
}

Parameters are described below.

ParameterDescription
AdImageResponse object
AdImageLimitsArray of AdImageLimit objects.
AdImageLimit object
LoginClient username.
CapacityThe total number of images the client can upload.
UtilizedThe number of uploaded images, plus the number of upload tasks with the "Pending" status.

Examples of input data

Python

{
   'Action': 'GetLimits',
   'SelectionCriteria': {
      'Logins': ['agrom','larry']
   }
}

PHP

array(
   'Action' => 'GetLimits',
   'SelectionCriteria' => array(
      'Logins' => array('agrom','larry')
   )
)

Perl

{
   'Action' => 'GetLimits',
   'SelectionCriteria' => {
      'Logins' => ['agrom','larry']
   }
}