Document jobs api (#1896)

This commit is contained in:
Mike Degatano 2023-10-06 15:09:23 -04:00 committed by GitHub
parent 1fd39795ad
commit 3ffba09d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 60 additions and 1 deletions

View File

@ -1620,7 +1620,7 @@ Get information about host services.
Shutdown the host Shutdown the host
</ApiEndpoint> </ApiEndpoint>
### ingress ### Ingress
<ApiEndpoint path="/ingress/panels" method="get"> <ApiEndpoint path="/ingress/panels" method="get">
@ -1675,6 +1675,53 @@ Validate an ingress session, extending it's validity period.
</ApiEndpoint> </ApiEndpoint>
### Jobs
<ApiEndpoint path="/jobs/info" method="get">
Returns info on ignored job conditions and currently running jobs
**Returned data:**
| key | type | description |
| ----------------- | ---------- | -------------------------------------------------------------- |
| ignore_conditions | list | List of job conditions being ignored |
| jobs | list | List of currently running [Jobs](api/supervisor/models.md#job) |
**Example response:**
```json
{
"ignore_conditions": [],
"jobs": [{
"name": "backup_manager_full_backup",
"reference": "a01bc3",
"uuid": "123456789",
"progress": 0,
"stage": "addons",
"done": false,
"child_jobs": []
}]
}
```
</ApiEndpoint>
<ApiEndpoint path="/jobs/options" method="post">
Set options for job manager
**Payload:**
| key | type | description |
| ----------------- | ---------- | --------------------------------------------------------- |
| ignore_conditions | list | List of job conditions to ignore (replaces existing list) |
</ApiEndpoint>
<ApiEndpoint path="/jobs/reset" method="post">
Reset job manager to defaults (stops ignoring any ignored job conditions)
</ApiEndpoint>
### Root ### Root
<ApiEndpoint path="/available_updates" method="get"> <ApiEndpoint path="/available_updates" method="get">

View File

@ -285,3 +285,15 @@ The `content` key of a backup object contains the following keys:
Request only fields may be included in requests but will never be in responses. Request only fields may be included in requests but will never be in responses.
Response only fields will be in responses but cannot be included in requests. Response only fields will be in responses but cannot be included in requests.
## Job
| key | type | description |
| ---------- | ------- | ------------------------------------------------------------- |
| name | string | Name of the job |
| reference | string | A unique ID for instance the job is acting on (if applicable) |
| uuid | string | Unique ID of the job |
| progress | int | Progress of the job (if accurate progress is obtainable) |
| stage | string | A name for the stage the job is in (if applicable) |
| done | boolean | Is the job complete |
| child_jobs | list | A list of child [jobs](#job) started by this one |