기존의 플레이어를 복제하는 방법은 다음과 같습니다.
요청
POST {API_URL}/players/{player_no}/clone
요청 파라미터
필드명 |
필수 여부 |
타입 |
제약 사항 |
설명 |
player_no |
Y |
Integer |
Path Parameter |
플레이어 번호 |
name |
Y |
String |
영문, 숫자, 최소 3자, 최대 30자. |
생성할 플레이어 이름 "플레이어 이름 검증" API 를 통해 검증할 수 있음 |
version |
Y |
String |
default 최신버젼 |
SDK 버젼 목록 조회 API 통해 확인 가능 |
auto_update |
N |
String |
default "N" |
자동 업데이트 여부 (Y / N ) |
성공 코드
HttpStatusCode |
Code |
Message |
200 |
200 |
ok |
에러 코드
HttpStatusCode |
Code |
Message |
Description |
200 |
4100 |
No version information. |
|
200 |
4601 |
Query string player_no is missing. |
|
200 |
4801 |
No player information. |
|
200 |
4802 |
This player already exists. |
|
200 |
4803 |
The number of players exceeded the limit. |
무료인 경우 1개로 제한 |
200 |
4805 |
The player name already exists. |
|
요청 예시
POST /api/v1/player
HOST: vpe.apigw.gov-ntruss.com
Content-Type: application/json
x-ncp-apigw-timestamp:1521787414578
x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
Request body
{
"auto_update": "N",
"name": "testVPE",
"version": "1.0.0"
}
응답 예시
HTTP/1.1 200 OK
Date: Fri, 26 Feb 2021 09:53:32 GMT
Content-Type: application/json;charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
// 성공 시
{
"code": "200",
"message": "ok"
}
// 실패 시
"error": {
"errorCode": "4802",
"message": "This player already exists."
}
}