メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
roles
/
{id}
/
permissions
Go
package example

import (
    context "context"

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

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &roles.ListRolePermissionsRequestParameters{
        PerPage: management.Int(
            1,
        ),
        Page: management.Int(
            1,
        ),
        IncludeTotals: management.Bool(
            true,
        ),
    }
    client.Roles.Permissions.List(
        context.TODO(),
        "id",
        request,
    )
}
[
  {
    "description": "<string>",
    "permission_name": "<string>",
    "resource_server_identifier": "<string>",
    "resource_server_name": "<string>"
  }
]

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

付与されている権限を一覧表示するロールのID。

クエリパラメータ

per_page
integer

ページごとの結果数。既定値は 50 です。

必須範囲: 1 <= x <= 100
page
integer

返される結果のページインデックス。最初のページは 0 です。

必須範囲: x >= 0
include_totals
boolean

結果を、合計件数を含むオブジェクトとして返すか(true)、結果の配列を直接返すか(false、既定値)を指定します。

レスポンス

ロールの権限が正常に取得されました。

description
string

この権限の説明。

permission_name
string

この権限の名前。

resource_server_identifier
string

この権限の対象であるリソースサーバー(API)の識別子。

resource_server_name
string

この権限の対象であるリソースサーバー(API)の名前。