Updated the server-api file with all comments

This commit is contained in:
Allan Wasega
2022-10-22 00:04:37 +03:00
committed by GitHub
parent 14e9155eb8
commit 7a0b98d9ce

View File

@@ -260,6 +260,8 @@ Servers can be stopped with a DELETE request:
DELETE /hub/api/users/:user/servers/[:servername]
```
**Required scope: `servers`**
Similar to when starting a server, issuing the DELETE request above might not stop the server immediately. Instead, the DELETE request has two possible response codes:
204 Deleted
@@ -270,7 +272,8 @@ It will now be absent from the user `servers` model.
: This code means your request was accepted, but is not yet completely processed.
The server has `pending: 'stop'` at this point.
There is no progress API for checking when a server actually stops. Thus, the only available alternative is to poll the server and wait for it to disappear from the user `servers` model.
There is no progress API for checking when a server actually stops.
Thus, the only available alternative is to poll the server and wait for it to disappear from the user `servers` model.
This Python code snippet can be used to check if a server stops: