列出自訂欄位

GET
https://www.digicert.com/services/v2/account/metadata

使用此端點列出您帳戶中的自訂訂單欄位的中繼資料。

cURL
curl -X GET \
  https://www.digicert.com/services/v2/account/metadata \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/account/metadata"

payload = ""
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
Go
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/account/metadata"

	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))

}
NodeJS
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.digicert.com/services/v2/account/metadata',
  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);
});
200 OK
{
  "metadata": [
    {
      "id": 112,
      "label": "Additional emails",
      "is_required": false,
      "is_active": true,
      "data_type": "email_list"
    },
    {
      "id": 113,
      "label": "Jira URL",
      "is_required": false,
      "is_active": true,
    },
    {
      "id": 114,
      "label": "For department",
      "is_required": true,
      "is_active": true,
      "data_type": "text"
    },
    {
      "id": 115,
      "label": "Invoice #",
      "is_required": true,
      "is_active": true,
      "data_type": "int"
    },
    {
      "id": 116,
      "label": "SRE contact",
      "is_required": false,
      "is_active": false,
      "data_type": "email_address"
    }
  ]
}

回應參數

名稱 類型 說明
metadata array 傳回的自訂訂單欄位物件的清單。
.. id int 自訂訂單欄位 ID。
.. label string 自訂訂單欄位的名稱。
此名稱出現在訂購表的欄位上方。
.. is_required bool 說明欄位是否必填。
.. is_active bool 說明欄位是否出現在訂購表上。
.. data_type string 客戶訂單欄位的輸入類型。
如果缺少,表示為任何內容的類型。
請參閱詞彙 — 自訂訂單欄位輸入類型