Obtener webhook GET
Obtén los detalles de un webhook específico mediante su identificador único.
Endpoint
GET https://api.pocketalert.app/v1/webhooks/{tid}Autenticación
Obligatorio
Incluye uno de estos encabezados en tu solicitud:
Token: <your-api-key>— Obtenla en Claves de APIAuthorization: Bearer <jwt-token>— Desde Iniciar sesión
Solicitud
Parámetros de ruta
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
tid | string | ✅ | Identificador único del webhook |
Encabezados
| Encabezado | Obligatorio | Descripción |
|---|---|---|
Token | ✅ | Tu clave de API |
Authorization | ✅ | Bearer <jwt-token> |
Ejemplo de solicitud
bash
curl -X GET "https://api.pocketalert.app/v1/webhooks/kblf7mh9j8jjyeh4fx" \
-H "Token: your-api-key"javascript
const tid = 'kblf7mh9j8jjyeh4fx';
const response = await fetch(`https://api.pocketalert.app/v1/webhooks/${tid}`, {
headers: { 'Token': 'your-api-key' }
});
const webhook = await response.json();python
import requests
tid = 'kblf7mh9j8jjyeh4fx'
response = requests.get(
f'https://api.pocketalert.app/v1/webhooks/{tid}',
headers={'Token': 'your-api-key'}
)
print(response.json())php
$tid = 'kblf7mh9j8jjyeh4fx';
$response = Http::withHeaders([
'Token' => 'your-api-key',
])->get('https://api.pocketalert.app/v1/webhooks/'.$tid);
return $response->json();Respuesta
Respuesta exitosa
200 OK
Devuelve el objeto del webhook
| Campo | Tipo | Descripción |
|---|---|---|
tid | string | Identificador único del webhook |
name | string | Nombre del webhook |
url | string | Slug de la URL del webhook |
message | string | Plantilla del mensaje |
is_active | boolean | Indica si el webhook está activo |
created_at | string | Fecha y hora de creación |
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"
}Respuestas de error
| Estado | Descripción |
|---|---|
401 | No autorizado — Token inválido o ausente |
404 | No encontrado — El webhook no existe |