docs: Add missing docs for alloc restart api

This commit is contained in:
Danielle Lancashire 2019-06-12 15:09:52 +02:00
parent 6742ef5d73
commit bea23e1eb1
No known key found for this signature in database
GPG Key ID: 8D65584EF3DDF91B
1 changed files with 43 additions and 0 deletions

View File

@ -649,3 +649,46 @@ $ curl -X POST -d '{"Signal": "SIGUSR1" }' \
```json
{}
```
## Restart Allocation
This endpoint restarts an allocation or task in-place.
| Method | Path | Produces |
| ------ | -------------------------- | -------------------------- |
| `POST` / `PUT` | `/v1/allocation/:alloc_id/restart` | `application/json` |
The table below shows this endpoint's support for
[blocking queries](/api/index.html#blocking-queries) and
[required ACLs](/api/index.html#acls).
| Blocking Queries | ACL Required |
| ---------------- | -------------------- |
| `NO` | `namespace:alloc-lifecycle` |
### Parameters
- `:alloc_id` `(string: <required>)`- Specifies the UUID of the allocation. This
must be the full UUID, not the short 8-character one. This is specified as
part of the path.
### Sample Payload
```json
{
"Task": "FOO"
}
```
### Sample Request
```text
$ curl -X POST -d '{"Task": "redis" }' \
https://localhost:4646/v1/client/allocation/5456bd7a-9fc0-c0dd-6131-cbee77f57577/restart
```
### Sample Response
```json
{}
```