Subscribe
The client lists the events withevents/list, then subscribes to each with events/subscribe, giving its own HTTPS callback URL and a whsec_ signing secret. Before it accepts a new callback, Pomerado sends it a signed challenge that it must echo back.
- Without arguments, a subscription covers every job you start through that client. Pass
job_idto follow one job. - A subscription lasts up to 24 hours; the client renews it by subscribing again. A renewal with a new secret signs with both for 24 hours.
- Each member can hold up to 20 subscriptions; each event and callback counts as one.
Handle events
The events are the same five that webhooks send:job.needs_input, job.input_expiring, job.succeeded, job.failed and job.repairing. Deliveries are signed and retried the same way, in this shape:
Act on an event
- On
job.needs_input, answer the question withanswer_job, or give the personprotected_input_urlfor a secret or login. - On
job.succeeded, read the result withget_jobwithin 60 minutes. The first read delivers it. - On
job.failed, checkpossible_commitbefore running a write again. - On
job.repairing, keep following the run withget_jobuntilmaintenance.deadline_at.
eventId.
A subscription covers only the jobs you start through that client. To hear about every job you start, from any client, use a webhook.