Read estimated export progress
Inspect the estimated row-count progress of a known export request in the selected publication. This read does not create an export, retrieve a file or establish completion or delivery.
| Task | Operation | Result |
|---|---|---|
| Inspect estimated request progress | GET /api/v1/admin/export-requests/{id}/progress | Rounded percentage and nullable estimated finish |
Before you start
Use the publication's existing public key and an existing active admin, partner or root staff session authorized there. Readonly, manager, support and service-account permissions for other operations do not grant access here. The request need not have been created by the caller. Obtain its already known ID from your authorized request context or publication owner; it is not a schedule ID. See credential transport.
| Header | Purpose |
|---|---|
resource | Required publication public key |
token | Required eligible staff session token |
Accept: application/json | Request JSON |
No body or action-specific query parameters are needed. All examples are synthetic and unexecuted. Fictional request7101 belongs to the selected publication. Set WALLKIT_API_BASE to scheme and host only, without a trailing slash or /api/v1, plus RESOURCE_KEY and STAFF_TOKEN. Examples use Bash/cURL with Python3 response checks, Node.js18+ native fetch in an .mjs file and Python3 urllib. The cURL subshell removes its temporary response. See sample runtimes.
Get estimated progress
GET /api/v1/admin/export-requests/{id}/progress
Inspect rounded-up row-count progress for a known request in the selected publication. The request need not be in proceeding state. This read does not change its state or confirm file availability. Progress and the finish estimate are separate from generation success and delivery.
| Input | Location / type | Meaning |
|---|---|---|
id | Required path integer, digits | Known export request ID in the selected publication; examples use 7101 |
Request
These examples check the two progress fields before use, retain a null finish estimate and print a fixed message. Shape checks do not establish successful generation or validate a returned timestamp's timezone.
(
response_file=$(mktemp) || exit 1
trap 'rm -f "$response_file"' EXIT
if ! status=$(curl --fail --silent \
"$WALLKIT_API_BASE/api/v1/admin/export-requests/7101/progress" \
--header 'Accept: application/json' --header "resource: $RESOURCE_KEY" \
--header "token: $STAFF_TOKEN" --output "$response_file" --write-out '%{http_code}'); then
printf '%s\n' 'Progress unavailable. Check the request, publication and session.' >&2
exit 1
fi
python3 - "$response_file" "$status" <<'PY'
import json
import sys
try:
if sys.argv[2] != "200":
raise ValueError()
with open(sys.argv[1], encoding="utf-8") as stream:
result = json.load(stream)
if not isinstance(result, dict) or "error" in result:
raise ValueError()
progress = result.get("progress")
if not isinstance(progress, dict) or not {"processed_percents", "expected_processing_finish"} <= progress.keys():
raise ValueError()
percent = progress["processed_percents"]
finish = progress["expected_processing_finish"]
if type(percent) is not int or not 0 <= percent <= 100 or not (finish is None or isinstance(finish, str)):
raise ValueError()
print("Progress received; check request metadata separately.")
except Exception:
raise SystemExit("Progress unavailable. Check the request, publication and session.") from None
PY
)
try {
const url = new URL("/api/v1/admin/export-requests/7101/progress", process.env.WALLKIT_API_BASE);
const response = await fetch(url, { headers: {
Accept: "application/json", resource: process.env.RESOURCE_KEY, token: process.env.STAFF_TOKEN
} });
if (response.status !== 200) throw new Error();
const result = await response.json();
if (!result || typeof result !== "object" || Array.isArray(result) || Object.hasOwn(result, "error")) {
throw new Error();
}
const progress = result.progress;
if (!progress || typeof progress !== "object" || Array.isArray(progress) ||
!Object.hasOwn(progress, "processed_percents") || !Object.hasOwn(progress, "expected_processing_finish")) {
throw new Error();
}
const percent = progress.processed_percents;
const finish = progress.expected_processing_finish;
if (!Number.isInteger(percent) || percent < 0 || percent > 100 ||
!(finish === null || typeof finish === "string")) throw new Error();
console.log("Progress received; check request metadata separately.");
} catch {
console.error("Progress unavailable. Check the request, publication and session.");
process.exitCode = 1;
}
import json
import os
from urllib.request import Request, urlopen
try:
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/export-requests/7101/progress"
request = Request(url, headers={"Accept": "application/json",
"resource": os.environ["RESOURCE_KEY"], "token": os.environ["STAFF_TOKEN"]})
with urlopen(request) as response:
if response.status != 200:
raise ValueError()
result = json.load(response)
if not isinstance(result, dict) or "error" in result:
raise ValueError()
progress = result.get("progress")
if not isinstance(progress, dict) or not {"processed_percents", "expected_processing_finish"} <= progress.keys():
raise ValueError()
percent = progress["processed_percents"]
finish = progress["expected_processing_finish"]
if type(percent) is not int or not 0 <= percent <= 100 or not (finish is None or isinstance(finish, str)):
raise ValueError()
print("Progress received; check request metadata separately.")
except Exception:
raise SystemExit("Progress unavailable. Check the request, publication and session.") from None
Response and interpretation
HTTP 200; complete synthetic progress object for an intermediate observation with no finish estimate:
{"progress": {"processed_percents": 40, "expected_processing_finish": null}}
| Field | Type / presence | Meaning |
|---|---|---|
progress | Required object | Contains the following two fields; no status, row counts, file link or delivery state |
progress.processed_percents | Required integer, intended range 0–100 | Processed-row percentage rounded up and capped at 100. 40 means 40%, not a fraction to multiply by 100 |
progress.expected_processing_finish | Required timestamp string or null | Estimated finish in Y-m-d H:i:s format when supplied; no timezone/UTC designation. Null means no estimate is supplied |
Percentage uses processed rows divided by total rows when both are positive; otherwise it is zero. Rounding can reach 100 before the raw ratio reaches one. Zero does not prove healthy inactivity, no work or an empty audience. The finish estimate uses elapsed time since request creation and rounded progress, so it can include waiting time, vary between observations or be unavailable. At 0% or 100%, the finish estimate is null. It is not a stable deadline or remaining-duration value. Show a null estimate as unavailable; it is not an epoch date or zero time remaining.
This separate synthetic alternate illustrates 100% with no finish estimate:
{"progress": {"processed_percents": 100, "expected_processing_finish": null}}
Neither 100% nor an available estimated timestamp confirms generation success, a durable file or delivery. The endpoint supplies no polling cadence or stale-request repair action. Ask the authorized owner or support to review stored request state when the result is unclear; progress alone supplies no generation or repair instruction.
A missing request or one outside the selected publication returns HTTP 409, not 404:
{"error": "invalid_data", "error_description": "Export request not found", "req_guid": "SYNTHETIC_REQUEST_REFERENCE"}
| HTTP status | API code/response shape | Cause | Next action |
|---|---|---|---|
| 200 | Percentage 0 and/or null finish estimate | Progress does not establish healthy inactivity or a usable finish estimate | Keep the uncertainty visible and review known request state with authorized support; do not invent a completion time |
| 200 | Percentage 100 | Rounded/capped row-count result, without completion/file/delivery confirmation | Review the stored request state with its authorized owner |
| 409 | invalid_data / Export request not found | No matching ID in the selected publication | Recheck the known ID and publication; do not substitute another creator or type |
| 409 | invalid_data / Error retrieve export request progress data, or another returned description | Progress retrieval failed | Keep progress unavailable and give Wallkit the supplied request reference |
| Other status, unreadable JSON or wrong shape | No usable progress response | Context or response could not be used | Follow shared recovery, without a successful zero/null fallback |
Next, ask the authorized request owner or support to review an uncertain result. Progress alone does not confirm a usable file or delivery.
Shared recovery
Check HTTP status, parseable JSON, structured errors and both progress fields before using the result. If the response is unusable, show progress as unavailable and ask support to review persistent failures. Keep credentials and raw failures out of logs.
| HTTP status | API code/response shape | Cause | Next action |
|---|---|---|---|
| 404 | resource_not_exists | Publication context could not be resolved | Check its public key and integration context with the administrator |
| 401 | auth_failed, token_expired or token_compromised | Existing caller/session is absent or unusable | Use the existing authorized sign-in/session process |
| 401 | auth_access_fail | Caller is inactive or publication access is locked/suspended | Ask the administrator to review access |
| 401 or 403 | access | Caller does not meet this operation's access requirements | Confirm admin/partner/root eligibility; other list permissions do not grant these reads |
| 409 | initialize_failed | Request context initialization failed | Confirm publication/session context and provide the request reference if supplied |
| Other status or unusable response | No usable result | Retrieval failed or response could not be interpreted | Show unavailable and seek help without exposing credentials or raw response content |