使用此端点列出所有帐户用户。可以使用container_id
URL 查询字符串将结果筛选为特定容器。
将 ACCEPT
标头更改为 text/csv
以返回结果的 CSV 输出。
curl -X GET \
'https://www.digicert.com/services/v2/user' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/user"
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/user"
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/user',
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);
});
{
"users": [
{
"id": 125038,
"username": "jane.doe@digicert.com",
"account_id": <account_id>,
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@digicert.com",
"job_title": "Boss",
"telephone": "555-555-5555",
"status": "active",
"container": {
"id": 5,
"public_id": "<public_id>",
"name": "Company",
"parent_id": 0,
"template_id": 4,
"ekey": "<ekey>",
"has_logo": false,
"is_active": true
},
"access_roles": [
{
"id": 1,
"name": "Administrator"
}
],
"type": "standard",
"has_container_assignments": false
},
{
"id": 125039,
"username": "john.smith@digicert.com",
"account_id": <account_id>,
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@digicert.com",
"job_title": "Employee",
"telephone": "555-555-5555",
"status": "active",
"container": {
"id": 5,
"public_id": "<public_id>",
"name": "Company",
"parent_id": 0,
"template_id": 4,
"ekey": "<ekey>",
"has_logo": false,
"is_active": true
},
"access_roles": [
{
"id": 5,
"name": "Standard User"
}
],
"type": "standard",
"has_container_assignments": true,
"container_assignments": [
{
"id": <container_id>,
"parent_id": <parent_container_id>,
"name": <container_name>,
"is_active": true
]
}
],
"page": {
"total": 2,
"limit": 1000,
"offset": 0
}
}
名称 | 请求/选项 | 类型 | 描述 |
---|---|---|---|
container_id | 可选 | int | 将结果筛选为特定容器。 |
offset | 可选 | int | 在特定分页页码开始列表。 |
limit | 可选 | int | 将列表截断到指定的分页页码。 |
名称 | 类型 | 描述 |
---|---|---|
users | array | 通过请求返回的所有用户的列表。 |
.. id | int | 用户 ID。 |
.. username | string | 用于登录的字符串。 |
.. account_id | int | CertCentral 帐号。 |
.. first_name | string | 用户名字。 |
.. last_name | string | 用户姓氏。 |
string | 用户电子邮件地址。 | |
.. job_title | string | 用户职位名称。 |
.. telephone | string | 用户电话号码。 |
.. status | string |
用户帐户状态。 请参阅词汇表 - 用户状态 |
.. container | object | 关于主要帐户容器的详细信息。 |
.. .. id | int | 主要帐户容器的 ID。 |
.. .. public_id | string | 主要帐户容器的公共 ID。 |
.. .. name | string | 主要帐户容器的名称。 |
.. .. parent_id | int | 主要帐户容器的父 ID。 |
.. .. template_id | int | 容器使用的模板的 ID。 |
.. .. ekey | string | 用于自定义品牌的唯一密钥。 |
.. .. has_logo | bool | 容器的自定义徽标状态。 |
.. .. is_active | bool | 容器的活跃状态。 |
.. access_roles | array | 关于用户的指定访问角色的详细信息。 |
.. .. id | int |
访问角色的 ID。 请参阅词汇表 - 访问角色 |
.. .. name | string |
访问角色的名称。 请参阅词汇表 - 访问角色 |
.. type | string | 定义用户帐户类型。 |
.. has_container_assignments | bool |
容器分配状态。true 是否返回 container_assignments 数组。
|
.. container_assignments | array | 关于用户的容器分配的详细信息。 |
.. .. id | int | 指定容器的 ID。 |
.. .. parent_id | int | 父容器的 ID。 |
.. .. name | string | 指定容器的名称。 |
.. .. is_active | bool | 指定容器的状态。 |
页码 | object |
关于结果的详细信息。 使用 URL 查询字符串进行修改。 |