feat(xo-server/rest-api): support setting name_label/name_description

This commit is contained in:
Julien Fontanet
2023-01-25 17:29:20 +01:00
parent 53f4f265dc
commit 34ecc2bcbb
4 changed files with 59 additions and 1 deletions

View File

@@ -121,6 +121,20 @@ Content-Type: application/x-ndjson
{"name_label":"Debian 10 Cloudinit self-service","power_state":"Halted","url":"/rest/v0/vms/5019156b-f40d-bc57-835b-4a259b177be1"}
```
## Properties update
> This feature is restricted to `name_label` and `name_description` at the moment.
```bash
curl \
-X PATCH \
-b authenticationToken=KQxQdm2vMiv7jBIK0hgkmgxKzemd8wSJ7ugFGKFkTbs \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{ "name_label": "The new name", "name_description": "The new description" }' \
'https://xo.example.org/rest/v0/vms/770aa52a-fd42-8faf-f167-8c5c4a237cac'
```
## VM and VDI destruction
For a VM: