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 +{} +```