CertCentral Discovery 스캔을 통하여 찾은 인증서의 합계 및 모든 목록을 받습니다. 옵션으로 인증서 특성으로 결과를 필터합니다.
curl -X POST \
https://daas.digicert.com/apicontroller/v1/certificate/list \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"searchCriteriaList": [
{
"key":"cn",
"operation": "EQUALS",
"value": [
"www.digicert.com","www.cert.com","docs.digicert.com"
]
},
{
"key":"org",
"operation": "EQUALS",
"value": [
"DigiCert Inc"
]
},
{
"key":"status",
"operation": "EQUALS",
"value": [
"VALID"
]
},
{
"key":"serialNum",
"operation": "EQUALS",
"value": [
"0eb6eab418c873d8f3c031dcdddf18b0"
]
},
{
"key":"securityRating",
"operation": "EQUALS",
"value": [
"Not secure","At risk"
]
},
{
"key":"ca",
"operation": "EQUALS",
"value": [
"DigiCert SHA2 Secure Server CA"
]
},
{
"key":"daysToExpire",
"operation": "EQUALS",
"value": [
"90"
]
},
{
"key":"tags",
"operation": "EQUALS",
"value": [
"internal","devbox"
]
}
],
"accountId": "126993",
"divisionIds": [],
"startIndex": 1,
"pageSize": 50,
"sortedColumnId": "cn",
"sortOrder": "ASC"
}'
import requests
url = "https://daas.digicert.com/apicontroller/v1/certificate/list"
payload = "{\n \"searchCriteriaList\": [\n {\n \"key\": \"cn\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"www.digicert.com\",\"www.cert.com\",\"docs.digicert.com\"\n ]\n },\n {\n \"key\": \"org\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"DigiCert Inc\"\n ]\n },\n {\n \"key\": \"status\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"VALID\"\n ]\n },\n {\n \"key\": \"serialNum\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"0eb6eab418c873d8f3c031dcdddf18b0\"\n ]\n },\n {\n \"key\": \"securityRating\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"Not secure\",\"At risk\"\n ]\n },\n {\n \"key\": \"ca\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"DigiCert SHA2 Secure Server CA\"\n ]\n },\n {\n \"key\": \"daysToExpire\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"90\"\n ]\n },\n {\n \"key\": \"tags\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"internal\",\"devbox\"\n ]\n }\n ],\n \"accountId\": \"126993\",\n \"divisionIds\": [],\n \"startIndex\": 1,\n \"pageSize\": 50,\n \"sortedColumnId\": \"cn\",\n \"sortOrder\": \"ASC\"\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://daas.digicert.com/apicontroller/v1/certificate/list"
payload := strings.NewReader("{\n \"searchCriteriaList\": [\n {\n \"key\": \"cn\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"www.digicert.com\",\"www.cert.com\",\"docs.digicert.com\"\n ]\n },\n {\n \"key\": \"org\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"DigiCert Inc\"\n ]\n },\n {\n \"key\": \"status\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"VALID\"\n ]\n },\n {\n \"key\": \"serialNum\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"0eb6eab418c873d8f3c031dcdddf18b0\"\n ]\n },\n {\n \"key\": \"securityRating\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"Not secure\",\"At risk\"\n ]\n },\n {\n \"key\": \"ca\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"DigiCert SHA2 Secure Server CA\"\n ]\n },\n {\n \"key\": \"daysToExpire\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"90\"\n ]\n },\n {\n \"key\": \"tags\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"internal\",\"devbox\"\n ]\n }\n ],\n \"accountId\": \"126993\",\n \"divisionIds\": [],\n \"startIndex\": 1,\n \"pageSize\": 50,\n \"sortedColumnId\": \"cn\",\n \"sortOrder\": \"ASC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var request = require("request");
var options = { method: 'POST',
url: 'https://daas.digicert.com/apicontroller/v1/certificate/list',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ searchCriteriaList:
[ { key: 'cn', operation: 'EQUALS', value: [ 'www.digicert.com','www.cert.com','docs.digicert.com' ] },
{ key: 'org', operation: 'EQUALS', value: [ 'DigiCert Inc' ] },
{ key: 'status', operation: 'EQUALS', value: [ 'VALID' ] },
{ key: 'serialNum', operation: 'EQUALS', value: [ '0eb6eab418c873d8f3c031dcdddf18b0' ] },
{ key: 'securityRating', operation: 'EQUALS', value: [ 'Not secure','At risk' ] },
{ key: 'ca', operation: 'EQUALS', value: [ 'DigiCert SHA2 Secure Server CA' ] },
{ key: 'daysToExpire', operation: 'EQUALS', value: [ '90' ] },
{ key: 'tags', operation: 'EQUALS', value: [ 'internal','devbox' ] } ],
accountId: '126993',
divisionIds: [],
startIndex: 1,
pageSize: 50,
sortedColumnId: 'cn',
sortOrder: 'ASC' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"data": {
"totalCount": 81,
"currentCount": 50,
"certificateDetailsDTOList": [
{
"certId": "fb92ee3a2fd0cb6549e58c252f8787f467bfbeff",
"serialNum": "2bf1c0d8a20fef721f67011d6231c16e",
"validFrom": 1523318400000,
"expiryDate": 1591660799000,
"subject": "CN=*.aparat.com,OU=EssentialSSL Wildcard,OU=Domain Control Validated",
"issuedBy": "CN=COMODO RSA Domain Validation Secure Server CA, O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB",
"cn": "*.aparat.com",
"ca": "Comodo",
"firstDiscoveredDate": 1561409074447,
"keyLength": 2048,
"algoType": "SHA256withRSA",
"accountId": null,
"certStatusString": "VALID",
"owner": "",
"org": null,
"orgUnit": "Domain Control Validated",
"city": "",
"state": "",
"country": "",
"sanCount": 2,
"publicKeyAlgo": "RSA",
"san": "isBlobUTF8=true;[2, *.aparat.com];[2, aparat.com]",
"certRating": "Secure",
"tags": "",
"certStatusError": null,
"certIssues": "CRLDistributionPoints"
},
{
"certId": "4c5d6a9813d3c858ac1ba279a3dd318460bc9ad7",
"serialNum": "040b914d32914ffc2474a3fdfd892c99",
"validFrom": 1539734400000,
"expiryDate": 1573992000000,
"subject": "CN=espn.com",
"issuedBy": "CN=Amazon, OU=Server CA 1B, O=Amazon, C=US",
"cn": "espn.com",
"ca": "Amazon",
"firstDiscoveredDate": 1563917838074,
"keyLength": 2048,
"algoType": "SHA256withRSA",
"accountId": null,
"certStatusString": "VALID",
"owner": "",
"org": null,
"orgUnit": "",
"city": "",
"state": "",
"country": "",
"sanCount": 6,
"publicKeyAlgo": "RSA",
"san": "isBlobUTF8=true;[2, espn.com];[2, *.espn.com];[2, *.geo.hosted.espn.com];[2, *.us-west-2.aws.hosted.espn.com];[2, *.core.api.espn.com];[2, *.api.espn.com]",
"certRating": "Secure",
"tags": "internal",
"certStatusError": null,
"certIssues": "IsAliasMatchSAN,CRLDistributionPoints"
}
]
}
}
이름 | 필수/옵션 | 유형 | 설명 |
---|---|---|---|
searchCriteriaList | 옵션 | array | 지정된 조건에 대한 레코드를 받습니다. |
.. key | 옵션 | string |
검색 매개 변수입니다. 허용되는 값: cn , org , 상태 , serialNum , securityRating , ca , daysToExpire , tags
|
.. operation | 옵션 | string |
검색 연산자입니다. 허용되는 값: EQUALS
|
.. value | 옵션 | array | 검색 값입니다. |
accountId | 필수 | string | 계정 ID입니다. |
divisionIds | 옵션 | array | 부서 ID입니다. |
startIndex | 옵션 | int |
지정된 색인에서 시작합니다. 기본값: 1
|
pageSize | 옵션 | int |
페이지당 레코드의 수입니다. 기본값: 50
|
sortedColumnId | 옵션 | string |
지정된 매개 변수로 결과를 정렬합니다. 허용되는 값: cn , org , status , serialNum , securityRating , ca , daysToExpire 기본값: cn
|
sortOrder | 옵션 | string |
정렬 방향입니다. 허용되는 값: ASC (오름차순: 0-9, A-Z), DESC (내림차순: 9-0, Z-A)기본값: ASC
|
이름 | 유형 | 설명 |
---|---|---|
data | object | 컨테이너입니다. |
.. totalCount | int | 검색 조건과 일치하는 레코드의 합계입니다. |
.. currentCount | int | 현재 페이지에 레코드의 수입니다. |
.. certificateDetailsDTOList | array | 인증서 상세 정보에 대한 컨테이너입니다. |
.. .. certId | string | 인증서에 대해 DigiCert에서 생성한 고유한 ID입니다. 이것을 필요로 하는 API 요청에서 사용합니다. |
.. .. serialNum | string | 발급할 때 인증서에 할당한 일련 번호입니다. |
.. .. validFrom | string | 유효성 시작 날짜입니다. |
.. .. expiryDate | string | 유효성 종료 날짜입니다. |
.. .. subject | bool | 전체 인증서 고유 이름입니다. |
.. .. issuedBy | string | 인증서가 발급된 루트 인증서입니다. |
.. .. cn | string | 인증서에 일반 이름입니다. |
.. .. ca | string | 인증서를 발급한 인증 기관입니다. |
.. .. firstDiscoveredDate | string | CertCentral Discovery 스캔에서 인증서를 찾은 날짜입니다. |
.. .. keyLength | string | 인증서의 암호화 키 크기입니다. |
.. .. algoType | string | 인증서가 사용하는 암호화 알고리즘입니다. |
.. .. accountId | string | 계정 ID입니다. |
.. .. certStatusString | string |
상태 : 인증서
|
.. .. owner | string | CertCentral Discovery에서 정의된 소유자입니다. |
.. .. org | string | 인증서에 조직 이름입니다. |
.. .. orgunit | string | 인증서에 조직 부문입니다. |
.. .. city | string | 인증서에 도시입니다. |
.. .. state | string | 인증서에 주/도입니다. |
.. .. country | string | 인증서에 국가입니다. |
.. .. sanCount | string | 인증서에 주체 대체 이름의 수입니다. |
.. .. publicKeyAlgo | string | 인증서의 공개 키에 대한 암호화 알고리즘입니다. |
.. .. san | string | 인증서에 주체 대체 이름입니다. |
.. .. certRating | string |
인증서 보안 등급 , 업계 표준 및 인증서 설정에 기초합니다.
|
.. .. tags | string | 인증서 소유자, 구독자 또는 기타 관리자가 추가한 사용자 지정 태그입니다. |
.. .. certStatusError | string | 인증서 상태 검색 중 오류입니다. |
.. .. certIssues | string | 인증서 문제에 대한 차트 데이터입니다. |