使用此端點要求 Basic EV SSL 憑證。
Basic EV SSL 憑證越有使用彈性,越容易使 Basic EV 憑證符合您的需求。此憑證取代 EV SSL 和 SSL EV Multi Domain 產品。
curl -X POST \
https://www.digicert.com/services/v2/order/certificate/ssl_ev_basic \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"certificate": {
"common_name": "example.com",
"dns_names": [
"sub.example.com",
"app.example.com"
],
"csr": "<csr>",
"signature_hash": "sha256",
"organization_units": [
"Shared Services"
],
"server_platform": {
"id": 2
}
},
"comments": "Certificate for app server.",
"container": {
"id": 334455
},
"auto_renew": 1,
"custom_renewal_message": "Keep this renewed.",
"organization": {
"id": 123456,
"contacts": [
{
"contact_type": "ev_approver",
"user_id": 565622
},
{
"contact_type": "organization_contact",
"user_id": 565611
},
{
"contact_type": "technical_contact",
"first_name": "Jill",
"last_name": "Valentine",
"job_title": "STAR Member",
"telephone": "8017019600",
"email": "jill.valentine@digicert.com"
}
]
},
"validity_years": 2,
"payment_method": "balance"
}
import requests
url = "https://www.digicert.com/services/v2/order/certificate/ssl_ev_basic"
payload = "{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"example2.com\",\n \"example3.com\"\n ],\n \"csr\": \"<csr>\",\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Shared Services\"\n ],\n \"server_platform\": {\n \"id\": 45\n }\n },\n \"comments\": \"Certificate for app server.\",\n \"container\": {\n \"id\": 334455\n },\n \"auto_renew\": 1,\n \"custom_renewal_message\": \"Keep this renewed.\",\n \"organization\": {\n \"id\": 123456,\n \"contacts\": [\n {\n \"contact_type\": \"organization_contact\",\n \"user_id\": 565611\n },\n {\n \"contact_type\": \"technical_contact\",\n \"user_id\": 565615\n },\n {\n \"contact_type\": \"ev_approver\",\n \"first_name\": \"Jill\",\n \"last_name\": \"Valentine\",\n \"job_title\": \"STAR Member\",\n \"telephone\": \"8017019600\",\n \"email\": \"jill.valentine@digicert.com\"\n }\n ]\n },\n \"validity_years\": 2,\n \"payment_method\": \"balance\"\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://www.digicert.com/services/v2/order/certificate/ssl_ev_basic"
payload := strings.NewReader("{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"example2.com\",\n \"example3.com\"\n ],\n \"csr\": \"<csr>\",\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Shared Services\"\n ],\n \"server_platform\": {\n \"id\": 45\n }\n },\n \"comments\": \"Certificate for app server.\",\n \"container\": {\n \"id\": 334455\n },\n \"auto_renew\": 1,\n \"custom_renewal_message\": \"Keep this renewed.\",\n \"organization\": {\n \"id\": 123456,\n \"contacts\": [\n {\n \"contact_type\": \"organization_contact\",\n \"user_id\": 565611\n },\n {\n \"contact_type\": \"technical_contact\",\n \"user_id\": 565615\n },\n {\n \"contact_type\": \"ev_approver\",\n \"first_name\": \"Jill\",\n \"last_name\": \"Valentine\",\n \"job_title\": \"STAR Member\",\n \"telephone\": \"8017019600\",\n \"email\": \"jill.valentine@digicert.com\"\n }\n ]\n },\n \"validity_years\": 2,\n \"payment_method\": \"balance\"\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://www.digicert.com/services/v2/order/certificate/ssl_ev_basic',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate:
{ common_name: 'example.com',
dns_names: [ 'example2.com', 'example3.com' ],
csr: '<csr>',
signature_hash: 'sha256',
organization_units: [ 'Shared Services' ],
server_platform: { id: 45 } },
comments: 'Certificate for app server.',
container: { id: 334455 },
auto_renew: 1,
custom_renewal_message: 'Keep this renewed.',
organization:
{ id: 123456,
contacts:
[ { contact_type: 'organization_contact', user_id: 565611 },
{ contact_type: 'technical_contact', user_id: 565615 },
{ contact_type: 'ev_approver',
first_name: 'Jill',
last_name: 'Valentine',
job_title: 'STAR Member',
telephone: '8017019600',
email: 'jill.valentine@digicert.com' } ] },
validity_years: 2,
payment_method: 'balance' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "pending"
}
]
}
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "submitted"
}
]
}
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "approved"
}
],
"certificate_id": 113
}
{
"id": 112233,
"certificate_id": 113
}
{
"id": 112233,
"certificate_id": 113,
"certificate_chain": [
{
"subject_common_name": "example.com",
"pem": "<pem_certificate>"
},
{
"subject_common_name": "DigiCert SHA2 Secure Server CA",
"pem": "<pem_certificate>"
},
{
"subject_common_name": "DigiCert Global Root CA",
"pem": "<pem_certificate>"
}
]
}
如需有關允許的憑證欄位值的資訊,請參閱公開受信任的憑證 – 違反業界標準的資料條目。
名稱 | 必填/選填 | 類型 | 說明 |
---|---|---|---|
certificate | 必填 | object | 憑證詳細資料。 |
.. common_name | 必填 | string | 要保護安全的網域。 |
.. dns_names | 選填 | array |
要保護安全的其他網域。 可能產生其他成本。(請參閱最佳做法 – 免費取得兩個版本的網域。) |
.. csr | 必填 | string | 憑證簽章要求 (CSR)。 |
.. signature_hash | 必填 | string |
用於簽署憑證的雜湊演算法。 Code signing (代碼簽章) 憑證僅支援 SHA-256。 |
.. organization_units | 選填 | array | 憑證針對的您的組織的部門。 |
.. server_platform | 選填 | object |
伺服器平台類型。 預設: -1 (其他)
|
.. .. id | 必填 | int |
伺服器平台 ID。 請參閱詞彙 — 伺服器平台 |
.. profile_option | 選填 | string | 若使用自訂憑證設定檔,請指定設定檔名稱。 |
renewed_thumbprint | 選填 | string | 如果訂單是續訂的,請輸入之前訂單的主要憑證的 SHA-1 指紋。 |
validity_years | 必填 | int |
憑證有效的年數。 可以用 validity_days 或 custom_expiration_date 取代。允許的值: 1 ,2
|
custom_expiration_date | 選填 | string |
憑證的自訂到期日。日期不可早於將來的 825 天。 覆寫 validity_days 和 validity_years 格式: yyyy-MM-dd
|
comments | 選填 | string | 與核准者的訂單有關的註解。 |
auto_renew | 選填 | int |
說明憑證是否應該自動續訂。 預設: 0 允許的值: 0 (停用),1 (啟用)
|
custom_renewal_message | 選填 | string | 要納入續訂通知中的自訂訊息。 |
disable_renewal_notifications | 選填 | bool |
說明是否應停用續訂通知電郵。 預設: false
|
additional_emails | 選填 | array | 接收憑證通知電郵的其他電郵地址 (例如憑證發行、重複憑證、憑證續訂等)。 |
locale | 選填 | string |
DCV 電郵應使用的語言。 請參閱詞彙 — 地區設定代碼 |
renewal_of_order_id | 選填 | int | 如果訂單是續訂的,請輸入之前訂單的 ID。 |
payment_method | 選填 | string |
說明要使用的付款方法。 允許的值: balance ,card ,profile 預設: balance
|
dcv_method | 選填 | string |
確認網域控制權時使用的 DCV 方法。 請參閱詞彙 — DCV 方法 |
skip_approval | 選填 | bool |
說明訂單是否應跳過核准步驟,並在完成時立刻提交進行驗證和發行。 預設: false
|
disable_ct | 選填 | bool |
說明是否應停用憑證的 CT 記錄。 必須啟用特定訂單的 CT 記錄或將忽略此事項。請參閱允許使用者將憑證保存在 CT 記錄外。 預設: false
|
organization | 必填 | object | 適用於組織詳細資料的容器。 |
.. id | 必填 | int |
與訂單關聯的組織的 ID。 此外,您可以傳遞組織物件,以便在提交訂單時新增新組織。關於物件結構要求,請參閱建立組織。 |
.. contacts | 必填 | array |
適用於訂單的組織聯絡人清單。 註:您必須納入 ev_approver 聯絡人。若要取得可能的 EV 核准者,請參閱列出核准者。
|
.. .. contact_type | 必填 | string |
要新增到訂單中的聯絡人類型。 允許的值: organization_contact ,technical_contact ,ev_approver
|
.. .. user_id | 必填* | int |
帳戶的現有使用者或聯絡人的 ID。 *新增新聯絡人時可省略。 |
.. .. first_name | 選填 | string |
新聯絡人的名字。 註:省略 user_id 時必填。如果未省略 user_id ,將以新值更新指定使用者的資料。
|
.. .. last_name | 選填 | string |
新聯絡人的姓氏。 註:省略 user_id 時必填。如果未省略 user_id ,將以新值更新指定使用者的資料。
|
.. .. job_title | 選填 | string |
新聯絡人的職稱。 註:省略 user_id 時必填。如果未省略 user_id ,將以新值更新指定使用者的資料。
|
.. .. telephone | 選填 | string |
新聯絡人的電話號碼。 註:省略 user_id 時必填。如果未省略 user_id ,將以新值更新指定使用者的資料。
|
選填 | string |
新聯絡人的電郵地址。 註:省略 user_id 時必填。如果未省略 user_id ,將以新值更新指定使用者的資料。
|
|
container | 選填 | object | 視需要說明在其之下下訂單的容器。 |
.. id | 必填 | int | 容器 ID。 |
custom_fields | 選填* | array |
特定帳戶自訂欄位。 *是否需要這些欄位視您的自訂欄位設定而定。 |
.. metadata_id | 必填 | int | 自訂欄位 ID。 |
.. value | 必填 | string |
自訂欄位的值。 資料驗證類型視您的自訂欄位設定而定。 |
名稱 | 類型 | 說明 |
---|---|---|
id | int | 訂單 ID。 |
organization | object |
適用於新組織詳細資料的容器。 僅在建立有訂單的新組織時傳回。 |
.. id | int | 適用於新組織的組織 ID。 |
requests | array | 包含與要求有關的資訊。 |
.. id | int | 要求 ID。 |
.. status | string |
要求狀態。 可能的值: pending ,submitted ,approved ,rejected
|
certificate_id | int |
憑證 ID。 要求狀態是 approved 時傳回。
|