<?php
$params = http_build_query([
'customer' => '', // Kundenverzeichnis
'showAll' => 1, // 1 oder leer
'from' => '', // YYYY-MM-DD oder leer
'to' => '', // YYYY-MM-DD oder leer
'hasGeoData' => '', // 1 oder leer
]);
$url = "https://maengelmelder.eu/de-wGlobal/wGlobal/scripts/php/maengelmelder/api/v2/defects?$params";
$token = ""; // API-Key
$ch = curl_init($url);
// Header vorbereiten
$headers = [
"Authorization: Bearer $token",
"Accept: application/json",
];
// cURL-Optionen setzen
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_TIMEOUT => 10,
CURLOPT_SSL_VERIFYPEER => true,
]);
// Request ausführen
$response = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (curl_errno($ch)) {
echo "cURL Fehler: " . curl_error($ch);
exit;
}
curl_close($ch);
?>curl -X GET "https://maengelmelder.eu/de-wGlobal/wGlobal/scripts/php/maengelmelder/api/v2/defects?customer=&showAll=1&from=&to=&hasGeoData=" \
-H "Authorization: Bearer <DEIN_BEARER_TOKEN>" \
-H "Accept: application/json"