parent
7cc59817a3
commit
badc23d1c3
1 changed files with 98 additions and 0 deletions
@ -0,0 +1,98 @@ |
|||||||
|
## **POST /service/{serviceid}/status** |
||||||
|
|
||||||
|
|
||||||
|
## **Inhalt** |
||||||
|
--- |
||||||
|
- Parameter |
||||||
|
- Optionale Parameter |
||||||
|
- Beispiel Anfrage |
||||||
|
- Beispiel Antwort |
||||||
|
- Mögliche Fehlermeldungen |
||||||
|
--- |
||||||
|
|
||||||
|
### Parameter |
||||||
|
|
||||||
|
|URL Parameter | Typ | Beschreibung| |
||||||
|
|----------|-----|-------------| |
||||||
|
|serviceid | integer| Beschreibt die ID des Services |
||||||
|
|
||||||
|
|Body Parameter | Typ | Beschreibung| |
||||||
|
|----------|-----|-------------| |
||||||
|
| - | - | - | |
||||||
|
|
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### Optionale Parameter |
||||||
|
|
||||||
|
|Query-String Parameter | Typ | Beschreibung| |
||||||
|
|----------|-----|-------------| |
||||||
|
|-| -| - |
||||||
|
|
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### Beispiel Anfrage |
||||||
|
|
||||||
|
##### PHP |
||||||
|
```php |
||||||
|
<?php |
||||||
|
|
||||||
|
$curl = curl_init(); |
||||||
|
|
||||||
|
curl_setopt_array($curl, array( |
||||||
|
CURLOPT_URL => 'control.local/api/v2/service/12345/status', |
||||||
|
CURLOPT_CUSTOMREQUEST => 'POST', |
||||||
|
CURLOPT_HTTPHEADER => array( |
||||||
|
'X-TOKEN: test-token', |
||||||
|
'Content-Type: application/json' |
||||||
|
), |
||||||
|
)); |
||||||
|
|
||||||
|
$response = curl_exec($curl); |
||||||
|
|
||||||
|
curl_close($curl); |
||||||
|
echo $response; |
||||||
|
``` |
||||||
|
|
||||||
|
##### cURL |
||||||
|
```bash |
||||||
|
curl --location --request POST 'control.local/api/v2/service/12345/status' \ |
||||||
|
--header 'X-TOKEN: test-token' \ |
||||||
|
--header 'Content-Type: application/json' |
||||||
|
``` |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### Beispiel Antwort |
||||||
|
|
||||||
|
```json |
||||||
|
{ |
||||||
|
"status": "OK", |
||||||
|
"message": "power on" // Dedicated Servers, Windows VPS/Rootservers, Storage VPS returning a Message |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
```json |
||||||
|
{ |
||||||
|
"status": "OK", |
||||||
|
"vmstatus": "running", |
||||||
|
"qmpstatus": "running", |
||||||
|
"uptime": 101157, |
||||||
|
"cores": 1, |
||||||
|
"memory": 1024, |
||||||
|
"disk": "10 GB", |
||||||
|
"boot": "cdn", // Boot order | c = Hard drive | d = CDROM | n = Network |
||||||
|
"iso": "None", |
||||||
|
"isoRaw": "none", |
||||||
|
"bus": "ide2" |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
### Mögliche Fehlermeldungen |
||||||
|
|
||||||
|
> :warning: Status Code **403** - Permission denied |
||||||
|
|
||||||
|
> :warning: Status Code **400** - Reset failed. Is the Server powered off? |
||||||
|
|
||||||
|
> :warning: Status Code **500** - This action is not available for this service! |
Loading…
Reference in new issue