Ottieni tutti i webhook GET
Recupera l'elenco di tutti i webhook configurati nel tuo account.
Endpoint
GET https://api.pocketalert.app/v1/webhooksAutenticazione
Obbligatoria
Includi una di queste intestazioni nella tua richiesta:
Token: <your-api-key>— Ottienila da Chiavi APIAuthorization: Bearer <jwt-token>— Da Accedi
Richiesta
Intestazioni
| Intestazione | Obbligatoria | Descrizione |
|---|---|---|
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
| Campo | Tipo | Descrizione |
|---|---|---|
tid | string | Identificatore univoco del webhook |
name | string | Nome del webhook |
url | string | Slug URL del webhook |
message | string | Modello del messaggio |
is_active | boolean | Indica se il webhook è attivo |
created_at | string | Data 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
| Stato | Descrizione |
|---|---|
401 | Non autorizzato — token non valido o mancante |