Используйте эту конечную точку для вывода списка всех ключей API.
curl -X GET \
'https://www.digicert.com/services/v2/key?user_id=125039' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/key"
querystring = {"user_id":"125039"}
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/xml"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/key?user_id=125039"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
req.Header.Add("Content-Type", "application/xml")
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: 'GET',
url: 'https://www.digicert.com/services/v2/key',
qs: { user_id: '125039' },
headers:
{ 'Content-Type': 'application/xml',
'X-DC-DEVKEY': '{{api_key}}' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"api_keys": [
{
"id": 182,
"user": {
"id": 125039,
"first_name": "John",
"last_name": "Smith"
},
"status": "active",
"create_date": "2018-08-07T23:27:58+00:00",
"last_used_date": "2018-08-18T19:08:19+00:00",
"name": "Key Name",
"is_legacy": false,
"restricted_to_role_id": 0
},
{
"id": 184,
"user": {
"id": 125039,
"first_name": "John",
"last_name": "Smith"
},
"status": "active",
"create_date": "2018-06-21T08:20:51+00:00",
"last_used_date": "2018-07-11T15:28:14+00:00",
"name": "Another Key Name",
"is_legacy": false,
"restricted_to_role_id": 101
},
{
"id": 42,
"user": {
"id": 125039,
"first_name": "John",
"last_name": "Smith"
},
"status": "revoked",
"create_date": "2018-10-01T22:18:11+00:00",
"name": "A Third Key Name",
"is_legacy": false,
"restricted_to_role_id": 100
}
],
"acme_urls": [
{
"id": 15,
"user": {
"id": 10,
"first_name": "Jill",
"last_name": "Valentine"
},
"status": "active",
"create_date": "2019-07-31T22:02:31+00:00",
"last_used_date": "2019-07-31T22:07:33+00:00",
"name": "Secure Site Pro certificates",
"is_legacy": false,
"restricted_to_role_id": 100,
"acme_directory_url": "******bbBB",
"product_name_id": "ssl_securesite_pro",
"product_name": "Secure Site Pro SSL",
"organization_id": 123456,
"organization_name": "STARS",
"validity_days": "0",
"validity_years": "2"
},
{
"id": 16,
"user": {
"id": 12,
"first_name": "Leon",
"last_name": "Kennedy"
},
"status": "active",
"create_date": "2019-07-29T14:09:34+00:00",
"name": "Standard SSL certificates",
"is_legacy": false,
"restricted_to_role_id": 100,
"acme_directory_url": "******aaAA",
"product_name_id": "ssl_plus",
"product_name": "Standard SSL",
"organization_id": 123456,
"organization_name": "RCPD",
"validity_days": "90",
"validity_years": "0",
"profile_option": "http_signed_exchange"
}
]
}
Имя | Обязательный/Необязательный | Тип | Описание |
---|---|---|---|
user_id | необязательный | int | Получить ключи только для указанного пользователя. |
container_id | необязательный | int | Получить ключи только для указанного контейнера. |
Имя | Тип | Описание |
---|---|---|
api_keys | array |
Список всех ключей, найденных по запросу. См. Объект ключа доступа для предоставляемых в ответе параметров объекта. |
acme_urls | array |
Список всех URL-адресов ACME, найденных по запросу. См. Объект ключа доступа для предоставляемых в ответе параметров объекта. |