List container roles

GET
https://www.digicert.com/services/v2/container/{{container_id}}/role

Use this endpoint to list all access roles that are available to a container.

cURL
curl -X GET \
  'https://www.digicert.com/services/v2/container/{{container_id}}/role' \
  -H 'Content-Type: application/xml' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
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)
Go
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))

}
NodeJS
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);
});
200 OK
{
  "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"
    }
  ]
}

Response parameters

Name Type Description
access_roles array List of all roles returned by the request.
See Glossary – Access roles
.. id int ID of the access role.
.. name string Name of the access role.