---
id: get-all-workspace-roles
title: "Get All Workspace Roles"
description: "Get all workspace roles."
sidebar_label: "Get All Workspace Roles"
hide_title: true
hide_table_of_contents: true
api: eJztVMlu2zAU/BWCZ8Nyc9SpbhskQQs0cFL04ATGC/VsMaFIhqTsuIL+vY/U4gVI8wPVRVzmLTMcsuEFeuGkDdJonvMrDAyUYjvjXrwFgcwZhX76oB/0AkPttGfAlPSBmXVCwhakgieF/4rJHzSj7wfFLX8PsAWhFuit0R4fczYf054gmHl6RhE8c2gdetRB6g0LJX5UGaTHofD1/f3t5ZvARDNnN9S6ZuicccwIUTvPdqWkRA6Dk7gdKpzn5RNuLDqIWW4KkmuDYUUirEbgKgEJ53pinucNv5jN4u9U6rtaCPR+XSs2qEBxwuhAHCMcrFVSpGLZs48xDfeixAriSAasUnLrYk9BdqVi/ZWGCuMk7C39uSdSekPJUdcVz5fc7DQ6mm8l7tIACxlMGmxB1dCND6SgqKSmlQKtMvuK+ltVoGFDsY8THmRQsczJsfF20vVyQppI6f3PNfVw3lw7GVd0rRRvjxInG3w7ytNS8h7cuSMJ/lpLh0XkdxDhvfZGxQ+ZwDnY86OqPYTFOzEnp48J2CIdchu/Ca8wlKY3A4VbCCVNslE9nw2e8Oi26HxiXztFqDIE6/MsE8rUxZQE1QGmIDOwMsl97Jd52mVfIzTJ45GcK8M+5Zvf3nzH/TVCQYeSLx+PAXfRNJ09TmGj5FSPlqlk5xw+r4mTk3+S+WhZxgbKLipylnptUnivVd/bFxAvqIvoLOLZtT2bfprO3iPTBzBqq/c+iOT9oY8Eo61TuUahomMregVoLyBUnw8bsUtrfCCfHuV77yjP2msO1/D/i/jRi9hbKOBbyKwCskrbn1fTX4bl4SlJT2OSnPxZ0vnE3aZ5Ao+/nGrbuPxao4umpuEWnIx8kqMngwOj31/IruQPERlEv9Gz1Rn57M2M92C8oVeX92SMv+aGcnQ=
sidebar_class_name: "get api-method"
info_path: reference/api/agenta-backend
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading as={"h1"} className={"openapi__heading"} children={"Get All Workspace Roles"}></Heading>

<MethodEndpoint method={"get"} path={"/workspaces/roles"}></MethodEndpoint>

Get all workspace roles.

Returns a list of all available workspace roles.

Returns:
List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.

Raises:
HTTPException: If an error occurs while retrieving the workspace roles.

<div>
  <div>
    <ApiTabs label={undefined} id={undefined}>
      <TabItem label={"200"} value={"200"}>
        <div>Successful Response</div>
        <div>
          <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}>
            <TabItem label={"application/json"} value={"application/json"}>
              <SchemaTabs className={"openapi-tabs__schema"}>
                <TabItem label={"Schema"} value={"Schema"}>
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary style={{}} className={"openapi-markdown__details-summary-response"}>
                      <strong>Schema</strong>
                    </summary>
                    <div style={{ textAlign: "left", marginLeft: "1rem" }}></div>
                    <ul style={{ marginLeft: "1rem" }}>
                      <li>
                        <div
                          style={{
                            fontSize: "var(--ifm-code-font-size)",
                            opacity: "0.6",
                            marginLeft: "-.5rem",
                            paddingBottom: ".5rem",
                          }}
                        >
                          Array [
                        </div>
                      </li>
                      <SchemaItem
                        collapsible={false}
                        name={"role_name"}
                        required={true}
                        schemaName={"WorkspaceRole (string)"}
                        qualifierMessage={
                          "**Possible values:** [`owner`, `viewer`, `editor`, `evaluator`, `workspace_admin`, `deployment_manager`]"
                        }
                        schema={{
                          type: "string",
                          enum: ["owner", "viewer", "editor", "evaluator", "workspace_admin", "deployment_manager"],
                          title: "WorkspaceRole",
                        }}
                      ></SchemaItem>
                      <SchemaItem collapsible={true} className={"schemaItem"}>
                        <details style={{}} className={"openapi-markdown__details"}>
                          <summary style={{}}>
                            <strong>role_description</strong>
                            <span style={{ opacity: "0.6" }}>object</span>
                          </summary>
                          <div style={{ marginLeft: "1rem" }}></div>
                          <div>
                            <span className={"badge badge--info"}>anyOf</span>
                            <SchemaTabs>
                              <TabItem label={"MOD1"} value={"0-item-properties"}>
                                <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div>
                              </TabItem>
                            </SchemaTabs>
                          </div>
                        </details>
                      </SchemaItem>
                      <li>
                        <div style={{ fontSize: "var(--ifm-code-font-size)", opacity: "0.6", marginLeft: "-.5rem" }}>
                          ]
                        </div>
                      </li>
                    </ul>
                  </details>
                </TabItem>
                <TabItem label={"Example (from schema)"} value={"Example (from schema)"}>
                  <ResponseSamples
                    responseExample={'[\n  {\n    "role_name": "owner",\n    "role_description": "string"\n  }\n]'}
                    language={"json"}
                  ></ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem>
    </ApiTabs>
  </div>
</div>
