Get
Returns a list of images.
Restrictions
The method response may contain no more than 10,000 images.
The total number of images that meet the specified criteria is shown in the TotalObjectsCount output parameter. If the total is more than 10,000, you must use the Limit and Offset parameters to set up paged selection in order to get all the images.
Input data
The input data structure in JSON is shown below.
{
"method": "AdImage",
"param": {
/* AdImageRequest */
"Action": (string),
"SelectionCriteria": {
/* AdImageSelectionCriteria */
"Logins": [
(string)
...
],
"AdImageHashes": [
(string)
...
],
"Assigned": [
(string)
...
],
"Limit": (int),
"Offset": (int)
}
}
}
Parameters are described below.
Parameter | Description | Required |
AdImageRequest object | ||
---|---|---|
Action | Action: Get. | Yes |
SelectionCriteria | The AdImageSelectionCriteria object, which contains criteria for selecting images. | For agencies |
AdImageSelectionCriteria object | ||
Logins | For agencies, an array containing usernames of clients (no more than 10) to perform the operation for. For advertisers, this parameter is ignored. | For agencies |
AdImageHashes | Array containing the hashes of images (no more than 10,000). | No |
Assigned | Array of strings containing filters for selecting images based on whether they are associated with ads:
| No |
Limit | The number of images in the response. The maximum allowed value is 10,000. If omitted, the limit is 10,000. When combined with the Offset parameter, this allows you to organize paginated selections from the database. | No |
Offset | The number of images that should be skipped when getting the selection. If omitted, 0 is assumed. When combined with the Limit parameter, this allows you to organize paginated selections from the database. | No |
Notes | ||
|
Parameter | Description | Required |
AdImageRequest object | ||
---|---|---|
Action | Action: Get. | Yes |
SelectionCriteria | The AdImageSelectionCriteria object, which contains criteria for selecting images. | For agencies |
AdImageSelectionCriteria object | ||
Logins | For agencies, an array containing usernames of clients (no more than 10) to perform the operation for. For advertisers, this parameter is ignored. | For agencies |
AdImageHashes | Array containing the hashes of images (no more than 10,000). | No |
Assigned | Array of strings containing filters for selecting images based on whether they are associated with ads:
| No |
Limit | The number of images in the response. The maximum allowed value is 10,000. If omitted, the limit is 10,000. When combined with the Offset parameter, this allows you to organize paginated selections from the database. | No |
Offset | The number of images that should be skipped when getting the selection. If omitted, 0 is assumed. When combined with the Limit parameter, this allows you to organize paginated selections from the database. | No |
Notes | ||
|
Output data
The output data structure in JSON is shown below.
{
"data": {
/* AdImageResponse */
"AdImages": [
{ /* AdImage */
"Login": (string),
"AdImageHash": (string),
"AdImageURL": (string),
"Name": (string),
"Assigned": (string)
}
...
],
"TotalObjectsCount": (int)
}
}
Parameters are described below.
Parameter | Description |
AdImageResponse object | |
---|---|
AdImages | Array of AdImage objects containing information about images. |
TotalObjectsCount | The total number of images that match the set criteria (without the Limit parameter). |
AdImage object | |
Login | Username of the image's owner. |
AdImageHash | Hash of the image. |
AdImageURL | The link to the uploaded image. |
Name | Caption (description) for the image. |
Assigned | Whether the image is assigned to at least one of the client's ads — Yes/No. |
Parameter | Description |
AdImageResponse object | |
---|---|
AdImages | Array of AdImage objects containing information about images. |
TotalObjectsCount | The total number of images that match the set criteria (without the Limit parameter). |
AdImage object | |
Login | Username of the image's owner. |
AdImageHash | Hash of the image. |
AdImageURL | The link to the uploaded image. |
Name | Caption (description) for the image. |
Assigned | Whether the image is assigned to at least one of the client's ads — Yes/No. |
Examples of input data
Python
{
'Action': 'Get',
'SelectionCriteria': {
'Logins': ['agrom','larry'],
'Assigned': ['Yes'],
'Limit': 20,
'Offset': 60
}
}
PHP
array(
'Action' => 'Get',
'SelectionCriteria' => array(
'Logins' => array('agrom','larry'),
'Assigned' => array('Yes'),
'Limit' => 20,
'Offset' => 60
)
)
Perl
{
'Action' => 'Get',
'SelectionCriteria' => {
'Logins' => ['agrom','larry'],
'Assigned' => ['Yes'],
'Limit' => 20,
'Offset' => 60
}
}