Skip to content

Jobs

The runner's work for an installation (a check, enable, a move's steps).

The installation's latest jobs

GET /v1/installations/{i}/jobs

Parameters

Name In Type Description
i (required) path string

Responses

Status Description Body
200 Up to 100 jobs, newest first. object
401 Unauthorized: No valid API key (or session). login_url is for the panel. Error
429 TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. Error
404 NotFound: No such object in your account (another account's ids answer the same). Error

Check your database

POST /v1/installations/{i}/check

Runs lokadb check on the SaaS database alone. Follow the job; its result holds the report.

Parameters

Name In Type Description
i (required) path string

Responses

Status Description Body
202 The job, queued for the runner. JobAnswer
401 Unauthorized: No valid API key (or session). login_url is for the panel. Error
429 TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. Error
404 NotFound: No such object in your account (another account's ids answer the same). Error

Enable LokaDB in your database

POST /v1/installations/{i}/enable

The account's owner only, from the panel (an API key gets 403). Type the database's name to confirm.

Parameters

Name In Type Description
i (required) path string

Body (application/json)

Field Type Description
confirm_db (required) string

Responses

Status Description Body
202 The job. JobAnswer
400 BadRequest: A field is missing or wrong. Error
401 Unauthorized: No valid API key (or session). login_url is for the panel. Error
429 TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. Error
403 Forbidden: The account is pending (account_pending, activated by us after "request access"), suspended, or the route is the owner's, or the key is read-only. Error
404 NotFound: No such object in your account (another account's ids answer the same). Error

A job

GET /v1/jobs/{id}

Parameters

Name In Type Description
id (required) path string

Responses

Status Description Body
200 The job; a check's result.report is its report. JobAnswer
401 Unauthorized: No valid API key (or session). login_url is for the panel. Error
429 TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. Error
404 NotFound: No such object in your account (another account's ids answer the same). Error

A job's events

GET /v1/jobs/{id}/events

Parameters

Name In Type Description
id (required) path string
after query integer, default 0

Responses

Status Description Body
200 The events. object
401 Unauthorized: No valid API key (or session). login_url is for the panel. Error
429 TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. Error
404 NotFound: No such object in your account (another account's ids answer the same). Error

A job's events as a stream

GET /v1/jobs/{id}/stream

Server-sent events, event: state then one per line of progress; ends with the job.

Parameters

Name In Type Description
id (required) path string

Responses

Status Description Body
200 The stream. text/event-stream
401 Unauthorized: No valid API key (or session). login_url is for the panel. Error
429 TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. Error
404 NotFound: No such object in your account (another account's ids answer the same). Error