{
"$defs": {
"JobState": {
"description": "A job's state.",
"oneOf": [
{
"const": "queued",
"description": "Waiting to run.",
"type": "string"
},
{
"const": "running",
"description": "Running.",
"type": "string"
},
{
"const": "succeeded",
"description": "Finished.",
"type": "string"
},
{
"const": "failed",
"description": "Failed; may retry.",
"type": "string"
},
{
"const": "dead",
"description": "Exhausted its attempts.",
"type": "string"
}
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "Query of `GET /mgmt/v1/jobs`: newest first.",
"properties": {
"before": {
"description": "Jobs with an id below this one.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"kind": {
"description": "Only jobs of this kind.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Page size, 1–100 (default 50).",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/JobState"
},
{
"type": "null"
}
],
"description": "Only jobs in this state."
}
},
"title": "JobsQuery",
"type": "object"
}