„POST /service/{serviceid}/reset“ ändern

master
Thomas Brinkmann 3 years ago
parent 3e090e8566
commit 73e011f19e
  1. 81
      POST-%2Fservice%2F%7Bserviceid%7D%2Freset.md

@ -0,0 +1,81 @@
## **POST /service/{serviceid}/reset**
## **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/reset',
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/reset' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json'
```
---
### Beispiel Antwort
```json
{
"status": "OK"
}
```
### 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 method is not available for this service!
Loading…
Cancel
Save