Passer au contenu principal
GET
https://{tenantDomain}/api/v2
/
roles
/
{id}
/
permissions
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    roles "github.com/auth0/go-auth0/management/roles"
    management "github.com/auth0/go-auth0/management"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Roles.Permissions.List(
        context.TODO(),
        "id",
        &roles.ListRolePermissionsRequestParameters{
            PerPage: management.Int(
                1,
            ),
            Page: management.Int(
                1,
            ),
            IncludeTotals: management.Bool(
                true,
            ),
        },
    )
}
[
  {
    "resource_server_identifier": "<string>",
    "permission_name": "<string>",
    "resource_server_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 chemin

id
string
requis

ID of the role to list granted permissions.

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).

Réponse

Role permissions successfully retrieved.

resource_server_identifier
string

Resource server (API) identifier that this permission is for.

permission_name
string

Name of this permission.

resource_server_name
string

Resource server (API) name this permission is for.

description
string

Description of this permission.