웹훅 조회 GET
고유 식별자로 특정 웹훅의 상세 정보를 조회해요.
엔드포인트
GET https://api.pocketalert.app/v1/webhooks/{tid}인증
필수
요청에 다음 헤더 중 하나를 포함해 주세요:
요청
경로 매개변수
| 매개변수 | 타입 | 필수 | 설명 |
|---|---|---|---|
tid | string | ✅ | 웹훅 고유 식별자 |
헤더
| 헤더 | 필수 | 설명 |
|---|---|---|
Token | ✅ | API 키 |
Authorization | ✅ | Bearer <jwt-token> |
요청 예시
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();응답
성공 응답
200 OK
웹훅 객체를 반환해요
| 필드 | 타입 | 설명 |
|---|---|---|
tid | string | 웹훅 고유 식별자 |
name | string | 웹훅 이름 |
url | string | 웹훅 URL 슬러그 |
message | string | 메시지 템플릿 |
is_active | boolean | 웹훅 활성화 여부 |
created_at | string | 생성 시각 |
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"
}오류 응답
| 상태 | 설명 |
|---|---|
401 | 인증 실패 — 토큰이 잘못되었거나 누락됨 |
404 | 찾을 수 없음 — 웹훅이 존재하지 않음 |