GetDownloadsList

Status

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 about a specified download - it is useful to check status of the download backlinks request that was send through previously.

Resources consumed

As no actual analysis is caused by calling this command, this command uses no resources.

Parameters

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, this command will return a complete list of downloads for the customer account. If a value is specified in the form of the DownloadJobID returned by DownloadBackLinks, this command will return data about that download.

Note: This field is mandatory for OpenApps applications.

Sample queries and response

XML response

<?xml version="1.0" encoding="UTF-8"?>
<Result Code="OK" ErrorMessage="" FullError="">
<GlobalVars IndexBuildDate="2013-02-24 21:47:24" IndexType="1" ServerBuild="2017-10-13 13:57:22" ServerName="XSTHEMACHINE" ServerVersion="1.0.6495.23321" UniqueIndexID="20130224214724-FRESH" />
<DataTables Count="1">
  <DataTable Name="Downloads" RowsCount="1" Headers="Description|JobID|Status|Created|Expires|LastUpdated|FileSize|LastError|PublicDownloadLocation|AnalysisProgressInfo">
     <Row>API Job: DownloadBackLinks (BEF3E03616DBC8F4EAF3CD7770B82CAB)|BEF3E03616DBC8F4EAF3CD7770B82CAB|4|16/10/2017 14:27:29|23/10/2017 14:27:29|16/10/2017 14:27:30|399| |http://downloads.majesticseo.com/download_historical_www_majestic_com_url_16_Oct_17_BEF3E03616DBC8F4EAF3CD7770B82CAB.csv.gz|</Row>
  </DataTable>
</DataTables>
</Result>

JSON response

{
  "Code": "OK",
  "ErrorMessage": "",
  "FullError": "",
  "IndexBuildDate": "2013-02-24 21:47:24",
  "IndexType": 1,
  "ServerBuild": "2017-10-13 13:57:22",
  "ServerName": "XSTHEMACHINE",
  "ServerVersion": "1.0.6495.23321",
  "UniqueIndexID": "20130224214724-FRESH",
  "DataTables": {
    "Downloads": {
      "Headers": {},
      "Data": [
        {
          "Description": "API Job: DownloadBackLinks (BEF3E03616DBC8F4EAF3CD7770B82CAB)",
          "JobID": "BEF3E03616DBC8F4EAF3CD7770B82CAB",
          "Status": "4",
          "Created": "16/10/2017 14:27:29",
          "Expires": "23/10/2017 14:27:29",
          "LastUpdated": "16/10/2017 14:27:30",
          "FileSize": "399",
          "LastError": "",
          "PublicDownloadLocation": "http://downloads.majesticseo.com/download_historical_www_majestic_com_url_16_Oct_17_BEF3E03616DBC8F4EAF3CD7770B82CAB.csv.gz",
          "AnalysisProgressInfo": ""
        }
      ]
    }
  }
}

Returned values

Return value Description
Global variables
Code Code indicating if deleting a download succeeded.
ErrorMessage A message explaining the error. This will be blank if the code is "OK".
FullError A verbose explanation of the error.
IndexBuildDate Date/time on which the index was updated.
IndexType Indicates whether the index was historic or fresh.
ServerBuild Date/time on which the server was built.
ServerName Name of the server where the file was stored.
ServerVersion The version of the server when the file was deleted.
UniqueIndexID Unique identifier for the index storing the deleted item.
Downloads data
Description Textual description of executed command.
JobID Unique identifier for this execution.
Status Demonstrates processing status out of one of the following states:
  1. AwaitingProcessing
  2. ProcessingInProgress
  3. AwaitingUploading
  4. UploadingInProgress
  5. ReadyForDownload - once domain has this or PendingNotification status it means that backlinks download is fully done
  6. Error - if the error took place during FTP upload (say if FTP server is down) then it will be retried automatically 10 minutes later
  7. PendingNotification - only used for downloads that had NotifyURL specified
  8. NotificationFailed - only used for downloads that had NotifyURL specified, where the notification failed
Created Date/time when the download link was created.
Expires Date/time when the download link expires.
LastUpdated Date/time when the download was last updated.
FileSize Size of the compressed file in bytes.
LastError Provides a textual explanation of the last error encountered downloading this object.
PublicDownloadLocation Publically accessible URL to download the CSV.
AnalysisProgressInfo Textual explanation of how the download is progressing.

Related commands

To see details on deleting this job, please see the documentation regarding DeleteDownloads.

Common problems

Problem Solution
Calling this command while waiting for a long running analysis job that creates a deferred response causes issues. Use longer delays between calls.