인물 수정 썸네일 설정

Prev Next

VPC 환경에서 이용 가능합니다.

인물에 썸네일을 추가합니다.

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
POST /api/v1/workspaces/{workspace_name}/persons/{person_id}/person-thumbnail

요청 헤더

Media Intelligence API 에서 공통으로 사용하는 헤더에 대한 정보는 Media Intelligence 요청 헤더를 참조해 주십시오.

요청 경로 파라미터

요청 경로 파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
workspace_name String Required 워크스페이스 이름
person_id Integer Required 인물 ID

요청 바디

요청 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
thumbnails Array Required 등록할 썸네일 목록: thumbnails

thumbnails

thumbnails에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
thumbnailKey String Required Object Storage에 업로드된 썸네일의 키값
isPrimaryThumbnail Boolean Required 대표 썸네일 여부
  • true | false

요청 예시

요청 예시는 다음과 같습니다.

curl --location --request POST 'https://mi.apigw.ntruss.com/api/v1/workspaces/my-workspace/persons/1001/person-thumbnail' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--data '{
  "thumbnails": [
    {
      "thumbnailKey": "my-workspace/W05xCokQ1v/jiho0.jpg",
      "isPrimaryThumbnail": true
    }
  ]
}'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
code String - API 처리 결과 코드
message String - API 처리 결과 메시지
result Object - 인물 썸네일 목록 객체
result.thumbnailList Array - 인물에 최종 등록된 썸네일 목록: thumbnailList
  • 기존 썸네일 + 새로 추가된 썸네일

thumbnailList

thumbnailList에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
id Integer - 썸네일 ID
url String - 썸네일 이미지 URL (Presigned URL)
isPrimaryThumbnail Boolean - 대표 썸네일 여부
  • true | false

응답 상태 코드

Media Intelligence API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Media Intelligence 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

{
  "code": "0",
  "message": "success",
  "result": {
    "thumbnailList": [
      {
        "id": 1234,
        "url": "https://kr.object.ncloudstorage.com/.../jiho0.jpg?...",
        "isPrimaryThumbnail": true
      }
    ]
  }
}