From b9725f7f21f3f871eb24eed911e8316fbb2f289b Mon Sep 17 00:00:00 2001 From: Thomas Brinkmann Date: Wed, 1 Jun 2022 19:34:34 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9EGET=20/service/{serviceid}/provisionin?= =?UTF-8?q?g/status=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ce%2F%7Bserviceid%7D%2Fprovisioning%2Fstatus.md | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 GET-%2Fservice%2F%7Bserviceid%7D%2Fprovisioning%2Fstatus.md diff --git a/GET-%2Fservice%2F%7Bserviceid%7D%2Fprovisioning%2Fstatus.md b/GET-%2Fservice%2F%7Bserviceid%7D%2Fprovisioning%2Fstatus.md new file mode 100644 index 0000000..4f11d9a --- /dev/null +++ b/GET-%2Fservice%2F%7Bserviceid%7D%2Fprovisioning%2Fstatus.md @@ -0,0 +1,89 @@ +## **GET /service/{serviceid}/provisioning/status** + + +## **Inhalt** +--- +- Parameter +- Optionale Parameter +- Beispiel Anfrage +- Beispiel Antwort +- Mögliche Fehlermeldungen +--- + +### Parameter + +|URL Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|serviceid | integer| Beschreibt die ID des Services + +--- + +### Optionale Parameter + +|Query-String Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|-| -| - + + + + +--- + +### Beispiel Anfrage + +##### PHP +```php + 'control.local/api/v2/service/12345/provisioning/status', + CURLOPT_CUSTOMREQUEST => 'GET', + 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 GET control.local/api/v2/service/449050/provisioning/status' \ +--header 'X-TOKEN: test-token' \ +--header 'Content-Type: application/json' +``` + +--- + +### Beispiel Antwort + +```json +{ + "status": "OK", + "templateid": 1, + "template": "AlmaLinux 8", + "statusmsg": "Retrieved file /BaseOS/x86_64/kickstart/images/pxeboot/initrd.img" +} +``` + +```json +{ + "status": "OK", + "queued": false +} +``` + + +### Mögliche Fehlermeldungen + +> :warning: Status Code **403** - Permission denied + +> :warning: Status Code **400** - Server is not Provisioning. No installation queued + +> :warning: Status Code **500** - This action is not available for this service! \ No newline at end of file