このエンドポイントを使用して、API キーについての詳細を取得します。
API 自体が返されることはありません。
curl -X GET \
'https://www.digicert.com/services/v2/services/v2/key/{{key_id}}' \
-H 'Content-Type: application/xml' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/key/{{key_id}}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/xml"
}
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/key/{{key_id}}"
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/{{key_id}}',
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);
});
{
"id": 184,
"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": 15,
"user": {
"id": 10,
"first_name": "Jill",
"last_name": "Valentine"
},
"status": "active",
"create_date": "2018-11-20T22:27:47+00:00",
"name": "ACME URL Name",
"is_legacy": false,
"restricted_to_role_id": 0,
"acme_directory_url": "******nnAA",
"product_name_id": "ssl_plus",
"product_name": "Standard SSL",
"organization_id": 123456,
"organization_name": "STARS",
"validity_days": "0",
"validity_years": "2"
}
名前 | 種別 | 説明 |
---|---|---|
id | int | キー ID |
user | object | キーにリンクされたユーザーに関する詳細 |
.. id | int | ユーザー ID |
.. first_name | string | ユーザーの名 |
.. last_name | string | ユーザーの姓 |
status | string |
キーステータス 可能な値: active ,revoked
|
create_date | string |
キーが作成されたときのタイムスタンプ。 形式:UTC タイムゾーンと ISO 8601 日付 |
last_used_date | string |
キーが最後に使用されたときのタイムスタンプ。 形式:UTC タイムゾーンと ISO 8601 日付 |
name | string | キーの名前 |
is_legacy | bool | キーのレガシーステータス |
restricted_to_role_id | int |
API キー権限を所定の操作に制限するかどうかを指定します。 「用語集 — API キーのロール」を参照してください |
acme_directory_url | string |
難読化 ACME ディレクトリ URL. ACME キーについてのみ返されます。 |
product_name_id | string |
ACME 経由でオーダーされた製品の名前 ID。 ACME キーについてのみ返されます。 「用語集 — 製品識別子」を参照してください |
product_name | string |
ACME 経由でオーダーされた製品に適した名前。 ACME キーについてのみ返されます。 「用語集 — 製品識別子」を参照してください |
organization_id | string |
ACME 経由で証明書オーダーと関連した組織名。 ACME キーについてのみ返されます。 |
organizatin_name | string |
ACME 経由で証明書オーダーと関連した組織名。 ACME キーについてのみ返されます。 |
validity_days | string |
証明書が有効な日数。 ACME キーについてのみ返されます。 |
validity_years | string |
証明書が有効な年数。 ACME キーについてのみ返されます。 |