PBN.LTD API docs
View as Markdown

Jobs

Creating a site, deleting one, reinstalling, restoring or making a backup, changing a DNS record, re-checking health and Site Cleaner runs take seconds to minutes. Those calls answer at once (usually 202 Accepted) with a job:

{"data": {"id": 88001, "state": "Pending"},
 "job": {"id": "job_4f1c0a9e2b7d6c5a3e10", "kind": "backup.create", "status": "running",
         "url": "https://app.pbn.ltd/api/v1/jobs/job_4f1c0a9e2b7d6c5a3e10"}}

Poll GET /jobs/{job_id} until status is succeeded or failed; message says what happened. The status is read live from the site or backup itself, so it is always what the panel shows.

kindfinished when
site.createthe site is installed (Ok, or waiting for its nameservers)
site.updatethe server change is applied (PHP version, domain, HTTPS/www)
site.reinstall, site.restorethe site is back up
site.deletethe site is gone
backup.createthe backup is Ok
dns.publishthe records were published at the DNS provider
health.recheckthe home page was probed again
cleaner.scan, cleaner.clean, cleaner.undoSite Cleaner finished

A job with no result after 12 hours is marked failed.