레터박스 API
최신순으로 정렬된 레터박스 응답 메타데이터의 커서 페이지네이션 목록을 조회합니다.
| Authorization필수 | Bearer hato_live_... |
| If-None-Match | 304 조건부 캐시 검증을 위한 선택적 ETag. |
| 매개변수 | 설명 |
|---|---|
| limitinteger | 반환할 레코드 수(1~100, 기본값: 50). |
| cursorstring | 이전 응답에서 반환된 페이지네이션 커서. |
| sinceISO-8601 | 지정된 일시 이후에 전송된 항목 필터링(예: 2026-08-01T00:00:00Z). |
| untilISO-8601 | 지정된 일시 이전에 전송된 항목 필터링. |
| letterflow_idinteger | 레터플로 ID로 항목을 필터링합니다. |
| run_idUUID | 실행 ID로 항목을 필터링합니다. |
| status_codeinteger | HTTP/FTP 응답 코드로 필터링(예: 200, 404, 500). |
| pinnedboolean | 고정 상태('true' 또는 'false')로 필터링. |
curl -H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/?limit=20&pinned=true"
{
"data": [
{
"id": 42,
"letterflow_id": 7,
"letterflow_name": "Health Check",
"source_type": "letter",
"run_id": null,
"steps_url": null,
"request": {
"method": "GET"
},
"response": {
"status_code": 200
},
"duration_ms": 142,
"sent_at": "2026-08-28T14:30:00+00:00",
"request_sent_at": "2026-08-28T14:30:00.010000+00:00",
"response_received_at": "2026-08-28T14:30:00.152000+00:00",
"is_pinned": true,
"bodies_pruned": false,
"error_message": "",
"region": "au",
"spoke_id": "spoke-au-1",
"artifact_available": true,
"request_headers_url": "https://spoke-au.example/artifacts/...",
"request_body_url": null,
"response_headers_url": "https://spoke-au.example/artifacts/...",
"response_body_url": "https://spoke-au.example/artifacts/..."
}
],
"next_cursor": "eyJzZW50X2F0IjoiMjAyNi0wOC0yOFQxNDozMDowMCIsImlkIjo0Mn0"
}
ID를 기반으로 단일 레터박스 응답의 전체 메타데이터(새로 서명된 리전 아티팩트 URL 포함)를 조회합니다.
| idinteger필수 | 레터박스 항목의 고유 ID. |
curl -H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/42/"
{
"data": {
"id": 42,
"letterflow_id": 7,
"letterflow_name": "Health Check",
"source_type": "letter",
"run_id": null,
"steps_url": null,
"request": {
"method": "GET"
},
"response": {
"status_code": 200
},
"duration_ms": 142,
"sent_at": "2026-08-28T14:30:00+00:00",
"request_sent_at": "2026-08-28T14:30:00.010000+00:00",
"response_received_at": "2026-08-28T14:30:00.152000+00:00",
"is_pinned": false,
"bodies_pruned": false,
"error_message": "",
"region": "au",
"spoke_id": "spoke-au-1",
"artifact_available": true,
"request_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"request_body_url": null,
"response_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"response_body_url": "https://spoke-au.example/artifacts/read?token=..."
}
}
레터플로 단계 살펴보기
단계 목록에서 반환된 컴포넌트 ID를 사용하세요. ID는 대소문자를 구분하며 실행이 기록될 당시의 레터플로를 기준으로 합니다.
GET /api/v1/letterbox/{id}/steps/
GET /api/v1/letterbox/{id}/steps/{step_id}/
GET /api/v1/letterbox/{id}/steps/{step_id}/input/
GET /api/v1/letterbox/{id}/steps/{step_id}/output/
POST /api/v1/letterbox/{id}/native-inspection/
단계 조회에는 letterbox:read가 필요하며 지정 리전으로 리다이렉트됩니다. 실행을 시도한 컴포넌트가 실행 순서로 표시된 후 건너뛴 컴포넌트가 표시됩니다. 건너뛴 입력은 읽을 수 있지만 생성되지 않은 출력은 404를 반환합니다. 저장된 결과는 다시 평가하지 않습니다.
검사 갱신 엔드포인트를 사용하면 선택한 컴포넌트에 다시 접근하거나 기록된 콘텐츠의 서명된 URL을 가져올 수 있습니다. 만료된 콘텐츠에는 HTTP 410이 반환됩니다.
레터 단계 메타데이터에는 기록된 http_version이 있으면 포함됩니다. 이는 클라이언트의 선호 설정이 아닌 최종 응답에서 협상된 프로토콜입니다.
Bearer 키는 Hato API에 보내세요. 리전의 서명된 URL에 접근할 때는 API 키를 전달하지 않고 별도로 요청하세요.
항목 메타데이터에 아티팩트 링크가 있으면 이 엔드포인트를 사용하세요. 유효 기간이 짧은 리전 URL로 리디렉션됩니다. Location의 리전 URL은 API 키를 전달하지 않고 별도로 요청하세요. 개별 컴포넌트의 아티팩트는 단계 검사 엔드포인트를 사용하세요.
| idinteger필수 | 레터박스 항목 ID. |
| artifactstring필수 | 다음 중 하나: request-headers, request-body, response-headers, response-body. |
curl -sS -D - -o /dev/null -H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/42/response-body/"
curl -o response_payload.json "REGIONAL_LOCATION_URL"
HTTP/1.1 302 Found
Location: https://spoke-au.example/artifacts/read?token=ey...
Cache-Control: private, no-store
레터박스 항목을 고정하거나 고정 해제합니다. 고정 시 응답 본문이 만료 및 FIFO 용량 삭제로부터 보호됩니다.
| 항목 | 타입 | 설명 |
|---|---|---|
| is_pinned필수 | boolean | 고정하려면 true, 고정을 해제하려면 false로 설정합니다. |
curl -X PATCH \
-H "Authorization: Bearer $HATO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"is_pinned": true}' \
"https://hato-api.example/api/v1/letterbox/42/"
{
"data": {
"id": 42,
"letterflow_id": 7,
"letterflow_name": "Health Check",
"source_type": "letter",
"run_id": null,
"steps_url": null,
"request": {
"method": "GET"
},
"response": {
"status_code": 200
},
"duration_ms": 142,
"sent_at": "2026-08-28T14:30:00+00:00",
"request_sent_at": "2026-08-28T14:30:00.010000+00:00",
"response_received_at": "2026-08-28T14:30:00.152000+00:00",
"is_pinned": true,
"bodies_pruned": false,
"error_message": "",
"region": "au",
"spoke_id": "spoke-au-1",
"artifact_available": true,
"request_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"request_body_url": null,
"response_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"response_body_url": "https://spoke-au.example/artifacts/read?token=..."
}
}
단일 응답 레코드를 영구적으로 삭제하고 리전 Spoke에 저장된 아티팩트 정리를 트리거합니다.
| idinteger필수 | 삭제할 레터박스 항목의 고유 ID. |
curl -X DELETE \
-H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/42/"
고정하지 않은 레터박스 결과를 모두 삭제하고 관련 리전 아티팩트도 삭제합니다. Spoke를 일시적으로 사용할 수 없으면 정리 작업을 재시도 큐에 넣습니다.
curl -X DELETE \
-H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/"