Vai al contenuto

Ottieni tutti i webhook GET ​

Recupera l'elenco di tutti i webhook configurati nel tuo account.

Endpoint ​

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

Autenticazione ​

Obbligatoria

Includi una di queste intestazioni nella tua richiesta:

  • Token: <your-api-key> — Ottienila da Chiavi API
  • Authorization: Bearer <jwt-token> — Da Accedi

Richiesta ​

Intestazioni ​

IntestazioneObbligatoriaDescrizione
Token✅La tua chiave API
Authorization✅Bearer <jwt-token>

Esempio di richiesta ​

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();

Risposta ​

Risposta di successo ​

200 OK

Restituisce un array di oggetti webhook

CampoTipoDescrizione
tidstringIdentificatore univoco del webhook
namestringNome del webhook
urlstringSlug URL del webhook
messagestringModello del messaggio
is_activebooleanIndica se il webhook è attivo
created_atstringData e ora di creazione
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"
  }
]

Risposte di errore ​

StatoDescrizione
401Non autorizzato — token non valido o mancante

Documentazione di Pocket Alert