PrivateCA Overview
    • PDF

    PrivateCA Overview

    • PDF

    Article Summary

    Summary

    PrivateCA API is RESTful. In order to make PrivateCA Rest API requests, each of them must be authenticated with Sub Account via API Gateway.

    For more information, refer to API Gateway Manual (formerly, User Guide). An API request message consists of the following:

    Request description

    Header
      x-ncp-apigw-timestamp:{Timestamp}
      x-ncp-iam-access-key:{Sub Account Access Key}
      x-ncp-apigw-signature-v2:{API Gateway Signature}
      Content-Type:application/json
    Body
    
    URL
      https://pca.apigw.ntruss.com/api/v1/ca/{caTag}/{url}
    

    Example

    Request example

    curl -i -s -X GET \
    -H "x-ncp-apigw-timestamp:1598425115345" \
    -H "x-ncp-iam-access-key:3A03131E1348C83101" \
    -H "x-ncp-apigw-signature-v2:FkL1mw12345678DRu9R50tdGSyc/uQ/oTw=" \
    -H "Content-Type:application/json" \
    'https://pca.apigw.ntruss.com/api/v1/ca/4b0bbe37-eeea93b8'
    

    Response example

    {
        "code": "SUCCESS",
        "msg": "Success",
        "data": {
            "caInfo": {
                "signingCount": 0,
                "caType": "PRIVATE_ROOT",
                "caId": 1,
                "statusUpdateDate": null,
                "destroyDate": null,
                "alias": "portal_root_ca",
                "memo": "company portal root ca",
                "urlInfo": {
                    "ocsp": [],
                    "crl": [
                        "https://pca.apigw.ntruss.com/ext/4b0bbe37-eeea93b8/crl"
                    ],
                    "ca": [
                        "https://pca.apigw.ntruss.com/ext/4b0bbe37-eeea93b8/ca"
                    ]
                },
                "caTag": "4b0bbe37-eeea93b8",
                "rgstDate": 1597122400000,
                "status": "ACTIVE"
            },
            "caCertInfo": {
                "commonName": "*.portal.com",
                "country": "KR",
                "issuerName": "*.portal.com",
                "notAfterDate": 1912482399000,
                "publicKeyAlgorithm": "RSA",
                "notBeforeDate": 1597122370000,
                "locality": "Seoul",
                "stateProvince": "Gangnam gu",
                "organizationUnit": "Service Develop Unit",
                "certPem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
                "chainPem": "",
                "signatureAlgorithm": "SHA256withRSA",
                "serialNo": "2a:8e:c7:3b:f3:2b:50:f3:fd:e5:4f:23:b6:3a:ee:50:63:1a:fd:77",
                "caCertId": 1,
                "organization": "my company"
            }
        }
    }
    

    Error code

    Response codeResponse message
    FORBIDDEN"Forbidden"
    INTERNAL_SERVER_ERROR"Server internal error"
    UNPROCESSABLE_ENTITY"Invalid status"
    INVALID_REQUEST"Invalid request"
    UNAUTHORIZED"Unauthorized"
    NOT_FOUND"Not found"
    INVALID_STATUS"Invalid status"

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.