Skip to content

Work in progress, and work that just finished

GET
/api/v1/activity
curl --request GET \
--url http://localhost:11044/api/v1/activity \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

Running first, then recently settled, newest first. Settled work is kept briefly because “did that work?” is asked immediately after the thing finishes — dropping it on completion would make a fast success look like one that never ran.

Pinned failures first, then activity, running first

Media typeapplication/json
Array<object>

One piece of work the appliance is doing or has just finished, or a pinned failure, as GET /activity lists it. Held in memory only

object
detail

Why it ended the way it did, such as the failure message. Null while it runs

string
endedAt

When the work ended, an ISO-8601 UTC instant; on a pinned row, its latest failure. Null while it runs

string
failures

How many times a pinned job has failed since it began failing. Null on an ordinary row

integer format: int32
id
required

The activity’s id; for a pinned failure, “pin:” followed by its label

string
kind
required

What started the work

string
Allowed values: BACKGROUND HANDLER SCHEDULED POLL
label
required

What the work is, as a sentence about its subject, such as “Learning the X API”. Identifies a job across runs, and is what a pin is dismissed by

string
mine
required

True when the work is being done for the caller; false for the appliance’s own work, which carries no user. Other users’ work is never listed

boolean
pinned
required

True for a job that failed and has not worked since. The row stays until the job next succeeds or the pin is dismissed

boolean
startedAt
required

When the work began, an ISO-8601 UTC instant. On a pinned row, when the job began failing

string
state
required

Whether it is still running or how it ended. Always FAILED on a pinned row

string
Allowed values: RUNNING SUCCEEDED FAILED
type

A stable machine name for the kind of work, where a client may need to tell kinds apart, such as document.ingest, document.figures or document.mentions. Null for most work, and on pinned rows

string

Example

[
{
"kind": "BACKGROUND",
"state": "RUNNING"
}
]