Using the API
Runs and jobs
A run can take from a few seconds to half an hour, so starting one answers at once with 202 and a job. You follow the job until it is done.
#A run’s life
queuedWaiting for a lane. Cancellable, and refunded if cancelled.
runningBeing read. progress is 0–100 where the run says.
doneFinished. The result is on the job.
failedStopped with an error, refunded.
cancelledCancelled while queued, refunded.
A category report started through the API is also filed in your History in the app, and a review pull in your Reviews Intelligence pulls.
#Waiting for it
Ask for the job with wait (up to 30 seconds): the answer comes as soon as the run finishes, or when the wait is up. Ask again until status is done, failed or cancelled.
curl "https://appleak.app/api/v1/jobs/6f1c2b9e-1d0a-4c55-9a51-2b7f0c3e8d41?wait=30" \
-H "Authorization: Bearer $APPLEAK_KEY"See A job, Your jobs and Cancel a job in the reference.
#Starting it once
- Send an
Idempotency-Keyheader with each start. The same key again gets the same job, charged once; the same key with a different request is refused with422. - The same run, still waiting or going, is not started twice: you get the one already going, with
duplicate: true. Sendforce: trueto start another anyway.