증거 세트 가져오기
생체 캡처 중 생성된 증거 번들을 반환합니다 — 통제된 조건에서 활성 감지가 수행되었음을 증명하는 데 사용되는 캡처된 이미지, 메타데이터 및 캡처 산출물이 포함된 패키지입니다.
완료된 프로세스(state = PROCESS_STATE_FINISHED)에만 사용 가능합니다.
엔드포인트
| 환경 | URL |
|---|---|
| 프로덕션 | GET https://api.idcloud.unico.app/client/v1/process/{processId}/evidenceset |
| 샌드박스 | GET https://api.idcloud.uat.unico.app/client/v1/process/{processId}/evidenceset |
요청
Headers
| 헤더 | 값 |
|---|---|
Authorization | Bearer <access_token> (인증 참조) |
Path parameters
| 파라미터 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
processId | string (UUID) | 예 | 프로세스 생성에서 반환된 프로세스 식별자. |
예제
- cURL
- Node.js
curl -X GET https://api.idcloud.unico.app/client/v1/process/$PROCESS_ID/evidenceset \
-H "Authorization: Bearer $TOKEN" \
| jq -r .fileContents | base64 --decode > evidence-set.pdf
import { writeFile } from 'node:fs/promises';
async function getEvidenceSet(processId) {
const response = await fetch(
`https://api.idcloud.unico.app/client/v1/process/${processId}/evidenceset`,
{ headers: { Authorization: `Bearer ${accessToken}` } }
);
if (!response.ok) throw new Error(`Get Evidence Set failed with ${response.status}`);
const { fileContents } = await response.json();
// fileContents는 base64로 인코딩된 PDF 파일입니다
return Buffer.from(fileContents, 'base64');
}
// PDF를 디스크에 저장
await writeFile(`evidence-set-${processId}.pdf`, await getEvidenceSet(processId));
// 또는 브라우저로 전송(Express)
app.get('/processes/:id/evidence-set', async (req, res) => {
const pdf = await getEvidenceSet(req.params.id);
res
.type('application/pdf') // contentType은 전달하지 마세요: API는 "x-pdf"를 반환합니다
.set('Content-Disposition', 'inline; filename="evidence-set.pdf"')
.send(pdf);
});
응답
200 OK
{
"fileContents": "JVBERi0xLjMNCi...",
"contentType": "x-pdf"
}
| 필드 | 타입 | 설명 |
|---|---|---|
fileContents | string (base64) | 증거 세트 PDF이며, base64로 인코딩되어 있습니다. |
contentType | string | 현재는 x-pdf를 반환합니다. |
PDF 생성
x-pdf는 유효한 MIME 유형이 아니며, 브라우저가 이를 인식하지 못합니다. contentType을 브라우저로 전달하지 마세요. fileContents를 base64에서 디코딩하여, 위의 Node.js 예제처럼 application/pdf로 바이트를 제공하세요.
오류 코드
참고
이 엔드포인트에 대한 특정 code 또는 message 값은 API에서 노출되지 않습니다.
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
- 500 Internal Server Error