CheckUploadStatus

Returns a list of image upload tasks created by the Upload operation.

Tasks (including both completed tasks and tasks that finished with an error) are stored for about one day.

Restrictions

The method response may contain no more than 10,000 upload tasks.

The total number of tasks 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)
            ...
         ],
         "AdImageUploadTaskIDS": [
            (int)
            ...
         ],
         "Limit": (int),
         "Offset": (int)
      },
   }
}

Parameters are described below.

Parameter Description Required
AdImageRequest object
Action Action: CheckUploadStatus. Yes
SelectionCriteria

The AdImageSelectionCriteria object, which contains the criteria for selecting the tasks to get the status of.

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
AdImageUploadTaskIDS

Array containing the numbers of upload tasks.

No
Limit

The number of tasks 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 tasks 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
  1. For advertisers: If the SelectionCriteria structure is empty, you will get all the tasks (up to 10,000).
  2. For agencies: If both the Logins and AdImageUploadTaskIDS criteria are set, you will get the tasks that meet both criteria simultaneously; the task number is shown in the AdImageUploadTaskIDS array, and the username of the image's owner is shown in the Logins array.

Output data

The output data structure in JSON is shown below.

{
   "data": {
      /* AdImageResponse */
      "AdImageUploads": [
         {  /* AdImage */
            "Login": (string),
            "AdImageUploadTaskID": (int),
            "Status": (string),
            "AdImageHash": (string),
            "AdImageURL": (string),
            "SourceURL": (string)
            "Name": (string),
            "Error": {
               /* Error */
               "FaultCode": (int),
               "FaultString": (string),
               "FaultDetail": (string)
            }
         }
         ...
      ],
      "TotalObjectsCount": (int)
   }
}

Parameters are described below.

Parameter Description
AdImageResponse object
AdImageUploads Array of AdImageUpload objects containing information about upload tasks.
TotalObjectsCount The total number of tasks that match the set criteria (without the Limit parameter).
AdImageUpload object
Login Username of the image's owner.
AdImageUploadTaskID Number of the image upload task.
Status Status of the image upload:
  • Pending — Image is waiting to be uploaded.
  • Done — Image was uploaded successfully.
  • Error — An error occured while uploading the image. In this case, the method response contains the Error parameter.
AdImageHash Hash of the image. This parameter is returned if the image was uploaded successfully.
AdImageURL The link to the uploaded image. This parameter is returned if the image was uploaded successfully.
SourceURL The URL that the image was uploaded from.
Name Caption (description) for the image.
Error The Error object with an error that occured while uploading the image.
Error object
FaultCode Error code.
FaultString Textual message about the error.
FaultDetail Detailed description of the reason for the error.

Examples of input data

Python

{
   'Action': 'CheckUploadStatus',
   'SelectionCriteria': {
      'Logins': ['agrom','larry'],
      'AdImageUploadTaskIDS': [571703,571705,571707],
      'Limit': 20,
      'Offset': 60
   }
}

PHP

array(
   'Action' => 'CheckUploadStatus',
   'SelectionCriteria' => array(
      'Logins' => array('agrom','larry'),
      'AdImageUploadTaskIDS' => array(571703,571705,571707),
      'Limit' => 20,
      'Offset' => 60
   )
)

Perl

{
   'Action' => 'CheckUploadStatus',
   'SelectionCriteria' => {
      'Logins' => ['agrom','larry'],
      'AdImageUploadTaskIDS' => [571703,571705,571707],
      'Limit' => 20,
      'Offset' => 60
   }
}