parent
04afbe8d23
commit
75978d9acd
1 changed files with 98 additions and 0 deletions
@ -0,0 +1,98 @@ |
|||||||
|
## **POST /service/{serviceid}/provisioning** |
||||||
|
|
||||||
|
|
||||||
|
## **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| |
||||||
|
|----------|-----|-------------| |
||||||
|
| templateid | integer | Die ID des Templates das geladen werden soll für die Neuinstallation | |
||||||
|
| rootpass | string | Das Root Password welches für das System gesetzt wird | |
||||||
|
|
||||||
|
|
||||||
|
> :warning: Für die **KVM SERVER** ändert sich der Parameter ``templateid`` zu ``template`` |
||||||
|
|
||||||
|
|Body Parameter | Typ | Beschreibung| |
||||||
|
|----------|-----|-------------| |
||||||
|
| template | string | Der Name des Templates welches verwendet werden soll | |
||||||
|
| rootpass | string | Das Root Password welches für das System gesetzt wird | |
||||||
|
|
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### 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/provisioning', |
||||||
|
CURLOPT_CUSTOMREQUEST => 'POST', |
||||||
|
CURLOPT_POSTFIELDS =>'{ |
||||||
|
"template": "Debian10-64Bit", // templateid for Dedicated Server, Win VPS/Rootservers, Storage VPS |
||||||
|
"rootpass": "1qQertzuiopas!d" |
||||||
|
}', |
||||||
|
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/provisioning' \ |
||||||
|
--header 'X-TOKEN: test-token' \ |
||||||
|
--header 'Content-Type: application/json' \ |
||||||
|
--data-raw '{ |
||||||
|
"template": "Debian10-64Bit", // templateid for Dedicated Server, Win VPS/Rootservers, Storage VPS |
||||||
|
"rootpass": "1qQertzuiopas!d" |
||||||
|
}' |
||||||
|
``` |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### Beispiel Antwort |
||||||
|
|
||||||
|
```json |
||||||
|
{ |
||||||
|
"status": "OK" |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
### Mögliche Fehlermeldungen |
||||||
|
|
||||||
|
> :warning: Status Code **403** - Permission denied |
||||||
|
|
||||||
|
> :warning: Status Code **400** - Error, installation could not be queued. Is another installation already queued? |
||||||
|
|
||||||
|
> :warning: Status Code **500** - This action is not available for this service! |
Loading…
Reference in new issue