/api/report/v1/file/get.json?idReportFile=2
Get information about the state of a request and download the successfully created report files.
GET https://tracker.my.com/api/report/v1/file/get.json
Name | Value | Description |
---|---|---|
idReportFile * | Integer | Unique file identifier, received
in response to a successfully created request |
* — required parameters
/api/report/v1/file/get.json?idReportFile=2
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.
{
"code": 200,
"message": "Ok",
"data": {
"idReportFile": "2",
"status": "Success!",
"files": [
{
"link": "https://tracker.my.com/storage/download/report/2.8e8defceaf77a773550a8a011fb74b85.xlsx",
"timestampExpires": "1609502400"
}
]
}
}
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"
}
}
}
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
}
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 link to download a report:
{
"code": 200,
"message": "Ok",
"data": {
"idReportFile": "2",
"status": "Success!",
"files": [
{
"link": "https://tracker.my.com/storage/download/report/2.8e8defceaf77a773550a8a011fb74b85.xlsx",
"timestampExpires": "1609502400"
}
]
}
}