使用此端点列出在创建容器时可以使用的所有模板。
模板定义对容器可用的一组功能。
curl -X GET \
'https://www.digicert.com/services/v2/container/{{container_id}}/template' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/container/{{container_id}}/template"
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}}/template"
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}}/template',
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);
});
{
"container_templates": [
{
"id": 6,
"name": "Business Unit",
"date_created": "2015-09-08T20:34:55+00:00"
}
]
}
名称 | 类型 | 描述 |
---|---|---|
container_templates | array | 对指定容器可用的所有模板的列表。 |
.. id | int | 模板 ID。 |
.. name | string | 模板名称。 |
.. date_created | string |
创建模板的时间戳。 格式:UTC 时区和 ISO 8601 日期 |