mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
api docs: Add allocation stop
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user