Get state information

Get information about the state of a request to export segment.

Input data

Endpoint

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

Method

GET

Parameters

Name Value Description
idSegmentExport * Integer Unique export identifier

* — required parameters

Example query

/api/segment/v1/export/get.json?idSegmentExport=1

Responses

Success

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

  • The In progress status shows the progress

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

    {
      "code": 200,
      "message": "Ok",
      "data": {
        "idSegmentExport": "1",
        "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": {
        "idSegmentExport": "1",
        "status": "Success!",
        "files": [
          {
            "link": "https://tracker.my.com/storage/download/segment/1.1.c3217d0d061c695550c9cf8a8fa72520.csv.gz",
            "timestampExpires": "1617197992"
          },
          {
            "link": "https://tracker.my.com/storage/download/segment/1.1.c695fa72610d0cf8a550c9520217dc38.csv.gz",
            "timestampExpires": "1617197992"
          }
        ]
      }
    }

Errors

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

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