Log in

Get state information and download data

Get information about the state of a request and download the successfully created raw data files.

Input data

GET https://tracker.my.com/api/raw/v1/export/get.json

Parameters

Name Value Description
idRawExport * Integer Unique export identifier, received
in response to a successfully created request

* — required parameters

Example query

/api/raw/v1/export/get.json?idRawExport=4

Responses

Success

A 200 status code indicates success. It will include information on export according to status:

  • The In progress status shows the progress percentage and the isCancellable position (true if the cancel method is a success).

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idRawExport": "4",
        "status": "In progress",
        "progress": "64%",
        "isCancellable": false
      }
    }
  • The Error occurred status means that the export is interrupted and you can repeat the request.

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idRawExport": "4",
        "status": "Error occurred"
      }
    }
  • The User error occurred status means that the request under these conditions will never be complete. Because of the Too many lines in export error or the Too much export data error.

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idRawExport": "4",
        "status": "User error occurred",
        "errorMessage": "Too many lines in export"
      }
    }
  • The Canceled by user status means that the request was canceled.

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idRawExport": "4",
        "status": "Canceled by user"
      }
    }
  • The Success status means that export is complete. You will get the link to the file and a timestamp until the file is available for download.

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idRawExport": "4",
        "status": "Success!",
        "files": [
          {
            "link": "https://tracker.my.com/storage/download/raw/4.payment.26c427ac8680888803ee05e34835b6dd.0.csv.gz",
            "timestampExpires": "1529746957"
          },
          {
            "link": "https://tracker.my.com/storage/download/raw/4.payment.26c427ac8680888803ee05e34835b6dd.1.csv.gz",
            "timestampExpires": "1609502400"
          }
        ]
      }
    }

Errors

A 404 status code indicates that the request is unavailable or could not be found.

{
  "code": 404,
  "message": "Not Found",
  "data": {
    "error": {
      "detail": "Raw export request not found"
    }
  }
}

Restrictions

A 403 status code indicates that the method needs authorization. Maybe you made mistakes or forgot to send authorization data.

{
  "code": 403,
  "message": "Access denied",
  "data": null
}

Data download

In response to a successfully created Export API request, you will get a link to the file with the requested data. Depending on the size of the data, it can be a single file or a GZIP archive, one or more links.

You can download the data through the request to the Export API or using your browser, by copying the received link to the address bar.

The file is available for download until the time specified in the API response in the timestampExpires parameter.

For example, the links to download raw data files:

{
  "code": 200,
  "message": "Ok",
  "data": {
    "idRawExport": "4",
    "status": "Success!",
    "files": [
      {
        "link": "https://tracker.my.com/storage/download/raw/4.payment.26c427ac8680888803ee05e34835b6dd.0.csv.gz",
        "timestampExpires": "1529746957"
      },
      {
        "link": "https://tracker.my.com/storage/download/raw/4.payment.26c427ac8680888803ee05e34835b6dd.1.csv.gz",
        "timestampExpires": "1609502400"
      }
    ]
  }
}
Was this article helpful?