---
type: api
title: List roles
description: Retrieve all persisted roles.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-list-blueprinter-roles
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-list-blueprinter-roles
products:
  - Elastic Cloud Enterprise
---

# List roles

## Paths

- `GET` `/platform/infrastructure/blueprinter/roles`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

## Description

Retrieve all persisted roles.

## Response

The role aggregates.

`application/json`

- `values` ([] RoleAggregate)
  The list
  - `id` (string)
    The unique id of this role
  - `role` ({} RoleWithMeta)
    Persisted role along with metadata
    - `value` ({} Role)
      Describes whether certain runners are blessed to run a Role.
      - `id` (string)
        The unique id of this role
      - `auto_blessed` (boolean)
        Whether runners are automatically allowed to be assigned the containers of this role.
      - `containers` ([] ContainersEntry)
        The containers that are part of this role
        - `name` (string)
          Name of the association
        - `container_set_name` (string)
          The container set name (id)
        - `kind` (string)
          The kind of container set, should be one of 'docker', 'elasticsearch', 'kibana', or 'apm'
        - `options` ({} ContainersEntryOptions)
          Options for a ContainersEntry belonging to a role
          - `enabled` (boolean)
            Whether this allocation is active and should be created.
          - `auths` ([] ContainersEntryOptionsAuth)
            ZooKeeper Auths associated with this allocation
            - `scheme` (string)
              Scheme identifier, usually "digest"
            - `auth` (string)
              Plain-text auth. For the "digest" scheme
          - `acls` ([] ContainersEntryOptionsACL)
            ZooKeeper ACLs associated with this allocation
            - `id` (string)
              Identity within the provided scheme.
            - `perms` (integer)
              Permissions
            - `scheme` (string)
              Auth scheme, in Elastic Cloud this is usually "digest"
          - `runners_secret` (string)
            Secret shared between the runners that have containers in this container set allocated.
          - `container_set_secret` (string)
            Secret shared between the containers that are part of this container set.
          - `enabled_by_named_feature_flag` (string)
            A named feature flag to check whether this container is enabled or not
          - `overrides` ({} ContainersEntryOptionsOverrides)
            Overrides for the container allocation.
            - `container_config` ({} ContainersEntryOptionsContainerConfig)
              Container config. Roughly corresponds to Docker container config
              - `env` ([] string)
                List of environment variables on the form KEY=value
              - `host_config` ({} ContainerConfigHostConfig)
                 Docker host config
                - `extra_hosts` ([] string)
                  Ports that are exposed by the container.
                - `network_mode` (string)
                   Sets the networking mode for the container.
                - `cpu_period` (integer)
                  The length of a CPU period in microsecond
                - `restart_policy` ({} RestartPolicy)
                  A policy that is applied when a container unexpectedly exits
                  - `name` (string)
                    Identifier for the policy.
                  - `maximum_retry_count` (integer)
                    Maximum number of times to re-try before giving up
                - `port_bindings` (map string to PortBinding)
                  Map of ports that should be exposed on the host.
                - `binds` ([] string)
                  Volume bindings for the container.
                - `privileged` (boolean)
                  List of environment variables on the form KEY=value
    - `meta` ({} Metadata)
      Metadata of an entity
      - `created_time` (string)
        Creation time
      - `modified_time` (string)
        Modification time
      - `version` (string)
        Version
  - `blessings` ({} BlessingsWithMeta)
    Persisted Blessings along with metadata
    - `value` ({} Blessings)
      Describes whether certain runners are blessed to run a Role.
      - `runner_ids_to_blessing` (map string to Blessing)
        A mapping of Runner Ids to whether or not they are blessed to run the associated role
        Map values ({} Blessing)
        - `value` (boolean)
          Whether something is blessed or not
    - `meta` ({} Metadata)
      Metadata of an entity
      - `created_time` (string)
        Creation time
      - `modified_time` (string)
        Modification time
      - `version` (string)
        Version
  - `pending` ({} PendingStatesWithMeta)
    Persisted pending states for a role along with metadata
    - `value` ({} PendingStates)
      Describes whether certain runners are waiting to be blessed.
      - `runner_ids_to_pending_state` (map string to PendingState)
        A mapping of Runner Ids to whether or not they are waiting to be blessed to run the associated role
        Map values ({} PendingState)
        - `value` (boolean)
          Whether a runner is pending blessings or not
    - `meta` ({} Metadata)
      Metadata of an entity
      - `created_time` (string)
        Creation time
      - `modified_time` (string)
        Modification time
      - `version` (string)
        Version
## Code Examples

#### Console

```console
GET /platform/infrastructure/blueprinter/roles
```

#### curl

```curl
curl -X GET "/platform/infrastructure/blueprinter/roles"
```

