다음을 통해 공유


Person Directory Operations - Create Person

Person Directory에 새 사용자를 만듭니다. 이 사용자에게 얼굴을 추가하려면 Person Directory "개인 얼굴 추가"를 호출하세요.

POST {endpoint}/face/{apiVersion}/persons

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
apiVersion
path True

string

API 버전

endpoint
path True

string

uri

지원되는 Cognitive Services 엔드포인트(프로토콜 및 호스트 이름, 예: https://{resource-name}.cognitiveservices.azure.com).

요청 본문

Name 필수 형식 Description
name True

string

사용자 정의 이름, 최대 길이는 128입니다.

userData

string

선택적 사용자 정의 데이터입니다. 길이는 16K를 초과하지 않아야 합니다.

응답

Name 형식 Description
202 Accepted

CreatePersonResult

호출이 성공하면 빈 응답 본문이 반환됩니다. 서비스가 요청을 수락했으며 곧 처리를 시작할 예정입니다. 클라이언트는 'Operation-Location' 응답 헤더에 지정된 URL을 사용하여 작업 상태 및 결과를 쿼리할 수 있습니다. URL은 48시간 후에 만료됩니다.

헤더

  • Location: string
  • operation-Location: string
Other Status Codes

FaceErrorResponse

예기치 않은 오류 응답입니다.

헤더

x-ms-error-code: string

보안

Ocp-Apim-Subscription-Key

Azure AI Face 구독의 비밀 키입니다.

형식: apiKey
In(다음 안에): header

AADToken

Azure Active Directory OAuth2 흐름

형식: oauth2
Flow: accessCode
권한 부여 URL: https://api.example.com/oauth2/authorize
토큰 URL: https://api.example.com/oauth2/token

범위

Name Description
https://cognitiveservices.azure.com/.default

예제

Create Person in PersonDirectory

샘플 요청

POST {endpoint}/face/v1.2-preview.1/persons

{
  "name": "your_person_name",
  "userData": "your_user_data"
}

샘플 응답

location: https://contoso.com/operationstatus
operation-Location: https://contoso.com/operationstatus
{
  "personId": "85c0c630-c9c9-40f8-8a4e-f9ae4f926ea5"
}

정의

Name Description
CreatePersonResult

만들기 사람의 응답입니다.

FaceError

오류 개체입니다. Face Service에서 반환된 오류 코드 및 메시지에 대한 포괄적인 세부 정보는 다음 링크를 참조하세요. https://aka.ms/face-error-codes-and-messages.

FaceErrorResponse

오류 세부 정보가 포함된 응답입니다.

CreatePersonResult

만들기 사람의 응답입니다.

Name 형식 Description
personId

string

사용자의 개인 ID입니다.

FaceError

오류 개체입니다. Face Service에서 반환된 오류 코드 및 메시지에 대한 포괄적인 세부 정보는 다음 링크를 참조하세요. https://aka.ms/face-error-codes-and-messages.

Name 형식 Description
code

string

서버에서 정의한 오류 코드 집합 중 하나입니다.

message

string

사람이 읽을 수 있는 오류 표현입니다.

FaceErrorResponse

오류 세부 정보가 포함된 응답입니다.

Name 형식 Description
error

FaceError

오류 개체입니다.