GetDownloadsList

Command status: Active
Supported by OpenApps API: Yes - With modifications
Supported by Internal/Reseller API: Yes
Possibly queued processing: No

Purpose: this command returns information on specified download - it is useful to check status of the download backlinks request that was send through previously.

Parameter Description

cmd

Required: must be set to: GetDownloadsList

datasource

Optional - defaults to historic
Either: "fresh" - to query against fresh index, or "historic" - to query against historic index.

DownloadJobID

Optional: if not specified then complete list of downloads for customer account will be returned (this can be very long), if specified it should match the DownloadJobID returned by DownloadBackLinks function it will return data in the same format but only for that download.

Note: This field is mandatory for OpenApps API

Below you can see example of successful XML returned for this function:



https://api.majestic.com/api/json?app_api_key=API_KEY&cmd=GetDownloadsList

This produces the following JSON:

The most interesting data column is numeric Status: it shows current processing status from the following possibilities:

0) AwaitingProcessing
1) ProcessingInProgress
2) AwaitingUploading
3) UploadingInProgress
4) ReadyForDownload - once domain has this or PendingNotification status it means that backlinks download is fully done
5) Error - if the error took place during FTP upload (say if FTP server is down) then it will be retried automatically 10 minutes later
6) PendingNotification - only used for downloads that had NotifyURL specified
7) NotificationFailed - only used for downloads that had NotifyURL specified, where the notification failed

In the example above the Status is 4 which means the download is ready.

Sample API query: https://api.majestic.com/api/xml?app_api_key=API_KEY&cmd=GetDownloadsList

Common problems

Problem: Calling this function every few seconds whilst waiting for a long running analysis job that creates a deferred download response to get ready.
Solution: Use longer delays when calling this function.

For more information about access to the Majestic API suite, visit our Plans & Pricing page.