Zum Inhalt springen

Alle Webhooks abrufen GET ​

Ruf eine Liste aller Webhooks ab, die in deinem Konto eingerichtet sind.

Endpunkt ​

GET https://api.pocketalert.app/v1/webhooks

Authentifizierung ​

Erforderlich

Füge einen dieser Header in deine Anfrage ein:

Anfrage ​

HeaderErforderlichBeschreibung
Token✅Dein API-Schlüssel
Authorization✅Bearer <jwt-token>

Beispielanfrage ​

bash
curl -X GET "https://api.pocketalert.app/v1/webhooks" \
  -H "Token: your-api-key"
javascript
const response = await fetch('https://api.pocketalert.app/v1/webhooks', {
  headers: { 'Token': 'your-api-key' }
});
const webhooks = await response.json();
python
import requests

response = requests.get(
    'https://api.pocketalert.app/v1/webhooks',
    headers={'Token': 'your-api-key'}
)
print(response.json())
php
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->get('https://api.pocketalert.app/v1/webhooks');

return $response->json();

Antwort ​

Erfolgreiche Antwort ​

200 OK

Gibt ein Array von Webhook-Objekten zurück

FeldTypBeschreibung
tidstringEindeutige Webhook-ID
namestringName des Webhooks
urlstringURL-Slug des Webhooks
messagestringNachrichtenvorlage
is_activebooleanOb der Webhook aktiv ist
created_atstringZeitstempel der Erstellung
json
[
  {
    "tid": "kblf7mh9j8jjyeh4fx",
    "name": "GitHub Push",
    "url": "cs994rqfkk8ljngt",
    "message": "Push to %repository.name%: %head_commit.message%",
    "is_active": true,
    "created_at": "01.09.2023 22:38:48"
  }
]

Fehlerantworten ​

StatusBeschreibung
401Nicht autorisiert — Token ungültig oder fehlt

Pocket Alert Dokumentation