mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 20:36:29 +00:00
Document jobs api (#1896)
This commit is contained in:
parent
1fd39795ad
commit
3ffba09d19
@ -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">
|
||||||
|
@ -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 |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user