Get state information

Get information about the state of a request to create a report file.

Input data

Endpoint

https://tracker.my.com/api/report/v1/file/get.json

Method

GET

Parameters

Name Value Description
idReportFile * Integer Unique file identifier

* — required parameters

Example query

/api/report/v1/file/get.json?idReportFile=2

Responses

Success

A 200 status code indicates success. It will include file info according to status:

  • The In progress status shows the progress percentage.

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idReportFile": "2",
        "status": "In progress",
        "progress": "64%",
      }
    }
  • The Error occurred status means that the file will never be created.

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idReportFile": "2",
        "status": "Error occurred"
      }
    }
  • The Success status means that file is created. You will get the link to the file and a timestamp until the file is available for download. For details, refer to the Data download section.

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idReportFile": "2",
        "status": "Success!",
        "files": [
          {
            "link": "https://tracker.my.com/storage/download/report/2.8e8defceaf77a773550a8a011fb74b85.xlsx",
            "timestampExpires": "1609502400"
          }
        ]
      }
    }

Errors

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

{
  "code": 404,
  "message": "Not Found",
  "data": {
    "error": {
      "detail": "File Report 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
}