api docs: Add allocation stop

This commit is contained in:
Danielle Lancashire
2019-04-23 13:28:21 +02:00
parent bc6b422d08
commit e4f57902f7

View File

@@ -567,3 +567,40 @@ $ curl \
- `Building Task Directory` - Task is building its file system.
Depending on the type the event will have applicable annotations.
## Stop Allocation
This endpoint stops and reschedules a specific allocation.
| Method | Path | Produces |
| ------ | -------------------------- | -------------------------- |
| `POST` / `PUT` | `/v1/allocation/:alloc_id/stop` | `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 Request
```text
$ curl -X POST \
https://localhost:4646/v1/allocation/5456bd7a-9fc0-c0dd-6131-cbee77f57577/stop
```
### Sample Response
```json
{
"EvalID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577",
"Index": 54
}