使用此端点获取关于容器的详细信息。
curl -X GET \
https://www.digicert.com/services/v2/container/{{container_id}} \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/container/{{container_id}}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/container/{{container_id}}"
req, _ := http.NewRequest("GET", url, nil)
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: 'GET',
url: 'https://www.digicert.com/services/v2/container/{{container_id}}',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"id": 6,
"public_id": "<public_id>",
"name": "Sales Department",
"description": "Includes sales engineers",
"parent_id": 2,
"template_id": 6,
"ekey": "<ekey>",
"has_logo": true,
"is_active": true,
"user_id_assignments": [
"125038"
],
"allowed_domain_names": [
"example1.com",
"example2.com"
],
"organization_assignments": [
{
"id": 7,
"status": "active",
"name": "Organization Name, LLC",
"display_name": "Organization Name",
"is_active": "1"
}
]
}
名称 | 类型 | 描述 |
---|---|---|
id | int | 容器 ID。 |
public_id | string | 容器的公共 ID。 |
name | string | 容器的名称。 |
description | string | 对容器的描述。 |
parent_id | id | 父容器的 ID。 |
template_id | id | 指定给容器的模板的 ID。 |
ekey | string | 用于自定义品牌的唯一密钥。 |
has_logo | bool | 容器的自定义徽标状态。 |
is_active | bool | 容器的活跃状态。 |
user_id_assignments | array | 指定给容器的用户的列表。 |
allowed_domain_names | array | 可以和容器一起使用的域的列表。 |
organization_assignments | array | 可以和容器一起使用的组织的列表。 |
.. id | int | 组织编号。 |
.. status | string |
组织状态。 可能的值: active ,inactive
|
.. name | string | 组织的法定名称。 |
.. display_name | string |
组织的全名。 使用名称 + assumed_name 构建。 |
.. is_active | string |
活跃状态标识符。 可能的值: 1 (活跃),0 (不活跃)
|