시스템 연결 API
초기 연결 검증과 상태 확인을 위한 API입니다.
공통 헤더
| Header | 필수 | 설명 |
|---|---|---|
X-API-Key |
/api/* 필수 |
발급 API Key |
Content-Type |
POST 필수 | application/json |
1) Health
GET /health
인증 없이 서버 프로세스 생존 여부를 확인합니다.
curl -sS "{BASE_URL}/health"
{
"status": "ok"
}
2) Status
GET /api/status
API Key 검증 후 서비스 상태를 반환합니다.
curl -sS \
-H "X-API-Key: {API_KEY}" \
"{BASE_URL}/api/status"
{
"service": "broadcast-api",
"status": "ok",
"environment": "Production",
"startedAtUtc": "2026-01-01T00:00:00Z",
"uptimeSeconds": 12345,
"key": {
"company": "YOUR_COMPANY",
"email": "admin@example.com",
"exp": "YYYY-MM-DD or 0000-00-00",
"tier": "PRO"
},
"checks": {
"api": true,
"awsRegionConfigured": true,
"awsCredentialsConfigured": true,
"ivsServiceReady": true,
"ivsChatServiceReady": true,
"broadcastServiceReady": true
},
"awsChecks": {
"region": "ap-northeast-2",
"sts": {
"ok": true,
"errorCode": null,
"message": null
},
"ivs": {
"ok": true,
"errorCode": null,
"message": null
},
"ivsChat": {
"ok": true,
"errorCode": null,
"message": null
}
}
}
3) Ping
GET /api/ping, POST /api/ping
요청/응답 왕복 테스트를 수행합니다. 두 요청 모두 API Key가 필요합니다.
curl -sS \
-H "X-API-Key: {API_KEY}" \
"{BASE_URL}/api/ping"
{
"ok": true,
"message": "pong",
"serverTimeUtc": "2026-01-01T00:00:00Z",
"traceId": "TRACE_ID_EXAMPLE"
}
POST 요청
curl -sS -X POST \
-H "Content-Type: application/json" \
-H "X-API-Key: {API_KEY}" \
-d "{\"message\":\"hello\"}" \
"{BASE_URL}/api/ping"
{
"ok": true,
"message": "pong",
"requestMessage": "hello",
"serverTimeUtc": "2026-01-01T00:00:00Z",
"traceId": "TRACE_ID_EXAMPLE"
}
오류 코드
UNAUTHORIZED_API_KEY(401)INVALID_API_KEY_FORMAT(403)INVALID_API_KEY_ENCODING(403)INVALID_API_KEY_LENGTH(403)INVALID_API_KEY_SIGNATURE(403)INVALID_API_KEY_PAYLOAD(403)INVALID_API_KEY_CLAIMS(403)INVALID_API_KEY_EMAIL(403)INVALID_API_KEY_EXP(403)EXPIRED_API_KEY(403)INVALID_API_KEY_TIER(403)