GET /service/{serviceid}/templates
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
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.dsh.gg/api/v2/service/12345/templates',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'X-TOKEN: test-token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
cURL
curl --location --request GET 'https://api.dsh.gg/api/v2/service/12345/templates' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json'
Beispiel Antwort
{
"status": "OK",
"totalResults": 25,
"page": 1,
"itemsPerPage": 10,
"maxPages": 3,
"items": [
{
"id": 1,
"name": "AlmaLinux 8",
"architecture": "amd64",
"tags": "centos8 almalinux8 kickstart linux"
},
{
"id": 2,
"name": "CentOS 6 (latest)",
"architecture": "amd64",
"tags": "centos6 kickstart linux centos"
},
{
"id": 3,
"name": "CentOS 7 (latest)",
"architecture": "amd64",
"tags": "centos7 kickstart linux centos8"
},
{
"id": 4,
"name": "CentOS 8 (latest)",
"architecture": "amd64",
"tags": "centos8 kickstart linux"
},
{
"id": 5,
"name": "Debian Bullseye",
"architecture": "amd64",
"tags": "debian preseed linux apt-get debian_64bit"
},
{
"id": 6,
"name": "Debian Buster",
"architecture": "amd64",
"tags": "debian preseed linux apt-get debian_64bit"
},
{
"id": 7,
"name": "Debian Jessie",
"architecture": "amd64",
"tags": "debian preseed linux apt-get debian_64bit"
},
{
"id": 8,
"name": "Debian Stretch",
"architecture": "amd64",
"tags": "debian preseed linux apt-get debian_64bit"
},
{
"id": 9,
"name": "Debian Wheezy",
"architecture": "amd64",
"tags": "debian preseed linux apt-get debian_64bit"
},
{
"id": 10,
"name": "FreeBSD 11.1",
"architecture": "amd64",
"tags": "freebsd freebsd11"
}
]
}
{
"status": "OK",
"totalResults": 2,
"page": 1,
"itemsPerPage": 10,
"maxPages": 1,
"items": [
"Debian10-64Bit",
"Debian11-64Bit"
]
}
Mögliche Fehlermeldungen
⚠️ Status Code 403 - Permission denied
⚠️ Status Code 400 - Reset failed. Is the Server powered off?
⚠️ Status Code 500 - Empty profile list