Get Webhook GET
Ambil detail webhook tertentu berdasarkan identifier unik-nya.
Endpoint
GET https://api.pocketalert.app/v1/webhooks/{tid}Autentikasi
Wajib
Sertakan salah satu header berikut dalam permintaan Anda:
Permintaan
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tid | string | ✅ | Identifier unik webhook |
Headers
| Header | Required | Description |
|---|---|---|
Token | ✅ | Kunci API Anda |
Authorization | ✅ | Bearer <jwt-token> |
Contoh Permintaan
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();Respons
Respons Sukses
200 OK
Mengembalikan objek webhook
| Field | Type | Description |
|---|---|---|
tid | string | Identifier unik webhook |
name | string | Nama webhook |
url | string | Slug URL webhook |
message | string | Templat pesan |
is_active | boolean | Apakah webhook aktif |
created_at | string | Waktu pembuatan |
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"
}Respons Error
| Status | Description |
|---|---|
401 | Unauthorized — Token tidak valid atau tidak ada |
404 | Not Found — Webhook tidak ada |