2 POST /service/{serviceid}/rescue
Thomas Brinkmann edited this page 2 years ago

POST /service/{serviceid}/rescue

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
rootpass string Das Root Password welches für das Rescue System gesetzt wird

Optionale Parameter

Query-String Parameter Typ Beschreibung
- - -
Body Parameter Typ Beschreibung
templateid integer Die ID des Rescue Templates das geladen werden soll

Beispiel Anfrage

PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.dsh.gg/api/v2/service/12345/rescue',
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
        "rootpass": "1qQertzuiopas!d" 
  }',
  CURLOPT_HTTPHEADER => array(
    'X-TOKEN: test-token',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
cURL
curl --location --request POST 'https://api.dsh.gg/api/v2/service/12345/rescue' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "rootpass": "1qQertzuiopas!d" 
}'

Beispiel Antwort

{
    "status": "OK"
}

Mögliche Fehlermeldungen

Status Code 403 - Permission denied

Status Code 400 - Error, installation could not be queued. Is another installation already queued?

Status Code 500 - This action is not available for this service!