Passer au contenu principal
GET
/
roles
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.roles.list({
        perPage: 1,
        page: 1,
        includeTotals: true,
        nameFilter: "name_filter",
    });
}
main();
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>"
  }
]

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de requête

per_page
integer

Number of results per page. Defaults to 50.

Plage requise: 1 <= x <= 100
page
integer

Page index of the results to return. First page is 0.

Plage requise: x >= 0
include_totals
boolean

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

name_filter
string

Optional filter on name (case-insensitive).

Réponse

Roles successfully retrieved.

id
string

ID for this role.

name
string

Name of this role.

description
string

Description of this role.