Используйте эту конечную точку для отображения всех типов доступа, доступных для контейнера.
curl -X GET \
'https://www.digicert.com/services/v2/container/{{container_id}}/role' \
-H 'Content-Type: application/xml' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/container/{{container_id}}/role"
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/container/{{container_id}}/role"
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/container/{{container_id}}/role',
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);
});
{
"access_roles": [
{
"id": 1,
"name": "Administrator"
},
{
"id": 2,
"name": "Limited User"
},
{
"id": 3,
"name": "Finance Manager"
},
{
"id": 4,
"name": "Manager"
},
{
"id": 5,
"name": "Standard User"
}
]
}
Имя | Тип | Описание |
---|---|---|
access_roles | array |
Список всех типов, предоставляемых в ответе на запрос. См. Словарь — Типы доступа |
.. id | int | Идентификатор типа доступа. |
.. name | string | Название типа доступа. |