Long request operations

Some API operations, like Export activities, take significant time to complete. To avoid client timeouts and ensure efficiency, these operations are designed asynchronously.

Asynchronous Design

  • Long-running operations are handled asynchronously to prevent blocking the client.
  • The API immediately returns a requestId to track the operation.

Sample response

{
  "requestId": "twl123456"
}

Polling the Results

  • Clients use the requestId to poll the Get long request endpoint for the operation status.
  • Once completed, the result is returned in JSON format.

Sample result

{
  "requestId": "twl123456",
  "status": "Completed",
  "result": {
    "downloadUrl": "https://example.com/exports/filename.zip",
  }
}

We suggest exponential backoff polling, as using increasing intervals: 5 seconds, 30 seconds, 1 minute, 5 minutes, and so on.

  • Results are stored for 30 days before being purged.