createExternalCertificate
- 인쇄
- PDF
createExternalCertificate
- 인쇄
- PDF
기사 요약
이 요약이 도움이 되었나요?
의견을 보내 주셔서 감사합니다.
개요
외부 인증기관에서 발급한 SSL 인증서를 추가합니다.
요청
Method | Request URI |
---|---|
POST | https://certificatemanager.apigw.gov-ntruss.com/api/v1/certificate/withExternal |
요청 헤더
헤더명 | 설명 |
---|---|
x-ncp-apigw-timestamp | 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타낸 것 API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주 |
x-ncp-iam-access-key | 네이버 클라우드 플랫폼에서 발급받은 API Key 또는 IAM에서 발급받은 AccessKey |
x-ncp-apigw-signature-v2 | Body를 AccessKey와 맵핑되는 SecretKey로 암호화한 서명 HMAC 암호화 알고리즘은 HmacSHA256 사용 |
accept | application/json 으로 지정 |
Content-Type | application/json 으로 지정 |
요청 파라미터
파라미터명 | 필수 여부 | 타입 | 제약 사항 | 설명 |
---|---|---|---|---|
certificateName | Yes | String | 중복 불가 | 인증서 이름 |
privateKey | Yes | String | 중복 불가 | 인증서 개인키PEM–인코딩된 값을 입력합니다. |
publicKeyCertificate | Yes | String | 중복 불가 | 인증서 공개키PEM–인코딩된 값을 입력합니다. |
certificateChain | Yes | String | 중복 불가 | 인증서 체인PEM–인코딩된 값을 입력합니다. (인증서 체인 추출 방법은 Certificate Manager 사용 가이드에서 확인 가능) |
응답
응답 바디
필드명 | 타입 | 설명 |
---|---|---|
returnCode | String | 요청에 대한 처리 결과 코드 |
returnMessage | String | 요청에 대한 처리 결과 메시지 |
totalRows | Integer | sslCertificateList의 object 개수 |
sslCertificateList[] | String | 추가한 인증서 정보 |
예시
요청 예시
curl -X POST "https://certificatemanager.apigw.gov-ntruss.com/api/v1/certificate/withExternal"
-H "accept: application/json"
-H "Content-Type: application/json"
-H "x-ncp-iam-access-key: 72A565A16F1827A27DD5"
-H "x-ncp-apigw-timestam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AAAAQDAEgwRgIhAPXF4hYQev2k6X20t/y++0t1+tWj7FfIj7rbP0PmEOv7AiEA1Ds3EluKokoHZKUMMvlysi0dI0rECevEEflMDoTUEPYwDQYJKoZIhvcNAQELBQADggEBAEFHWKCqC7U3jyQ4q/asJ/T+CBKEVP91+KL/Tq8IbQEhELcMS+Q7ru8L7wxnHycW42syBj/CAdMJuOtbOldcxBgkekdxFRE8K+V4q33vm3D969cHpPDmNz4YLH+/LDAiTOVAFuviastrAxdqsprr/f4+/+ZE9QZ13NeZxup6NBlHB/6FPkTn3OBkatFPwaoSPnJ8XcDuxtQSHSz2aJc72N/932VaN8rrkHmM5SXMJ8bNEgBBCj6N/v0jY/suTz7C5b5VgyuKNgoHvzAb8/oLMDsgoARdIAjypOG/JoPhZqOOdhiVxYWBot/fAC8S1IXRp/dDuD2mS/lbLFksULw48Cg=-----END CERTIFICATE-----" }"
응답 예시
응답 헤더
connection: keep-alive
content-type: application/json;charset=UTF-8
date: Mon, 13 Jul 2020 14:14:26 GMT
referrer-policy: unsafe-url
server: nginx
transfer-encoding: chunked
x-ncp-apigw-response-origin: ENDPOINT
x-ncp-trace-id: 32cj46him8dhg30oj668rjedb3
응답 바디
{
"returnCode": "0",
"returnMessage": "Success",
"totalRows": 1,
"sslCertificateList": [
{
"certificateNo": 1,
"certificateName": "myCertificate-01",
"memberNo": "1",
"dnInfo": "CN=exmaple.net",
"domainAddress": "exmaple.net",
"subDomainAddress": "www.exmaple.net",
"regDate": "2020-05-30 14:40:48",
"issueDate": null,
"validStartDate": "2019-07-10 09:00:00",
"validEndDate": "2021-07-10 08:59:59",
"disuseDate": null,
"disuseMsg": null,
"requestId": null,
"statusCode": "1",
"statusName": "Normal",
"externalYn": "Y",
"domainCode": "PUB",
"caInfo": "XYZ RSA Domain Validation Secure Server CA",
"certSerialNumber": "bfc9f64ca4532d9897d542c72988d61f",
"certPublicKeyInfo": "Sun RSA public key, 2048 bits",
"certSignAlgorithmName": "SHA256withRSA",
"usedInstanceNoList": null
}
]
}
오류 코드
아래 오류 코드는 이 액션(Action)에서 특징적으로 발생하는 오류입니다. 공통적으로 발생하는 오류에 대한 상세한 설명은 NAVER Cloud Platform API를 참고해주세요.
HTTP 응답 코드 | errorCode | message | 설명 |
---|---|---|---|
200 | 1002 | Unable to load certificate. Expecting PEM format file. | PEM 형식이 유효하지 않음 |
200 | 26034 | The certificate is invalid. | 인증서가 유효하지 않음 |
200 | 26040 | Public key in certificate does not match with private key. | 개인키 정합성이 유효하지 않음 |
400 | 2000 | CertificateName is invalid. certificateName can only contain 3-20 English alphabet, numbers, and "-" and must start with an alphabetic character. | 인증서 이름이 유효하지 않음 |
400 | 2100 | CertificateName is missing; PrivateKey is missing; PublicKeyCertificate is missing; CertificateChain is missing. | 인증서 이름 또는 개인키 또는 인증서 본문 또는 인증서 체인을 찾을 수 없음 |
이 문서가 도움이 되었습니까?