From bea23e1eb1b2d621f0d88a08d725cbbad21a54a2 Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Wed, 12 Jun 2019 15:09:52 +0200 Subject: [PATCH] docs: Add missing docs for alloc restart api --- website/source/api/allocations.html.md | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/website/source/api/allocations.html.md b/website/source/api/allocations.html.md index 2b7a124d8..897e24ba4 100644 --- a/website/source/api/allocations.html.md +++ b/website/source/api/allocations.html.md @@ -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: )`- 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 +{} +```