--- title: "List container roles" source_url: https://dev.digicert.com/certcentral-apis/services-api/containers/list-container-roles.html api_method: GET api_endpoint: "/services/v2/container/{{container_id}}/role" api_url: "https://www.digicert.com/services/v2/container/{{container_id}}/role" --- **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. ## Example requests and responses **cURL** ```bash 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** ```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** ```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** ```javascript 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 ```json { "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. |