Skip to content

Commit

Permalink
Merge pull request #752 from cloudflare/fetch-all-account-roles
Browse files Browse the repository at this point in the history
account_roles: get all roles using `per_page` attribute
  • Loading branch information
jacobbednarz authored Dec 11, 2021
2 parents 4e1eb04 + 1d51bfc commit 8f84ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion account_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type AccountRoleDetailResponse struct {
//
// API reference: https://api.cloudflare.com/#account-roles-list-roles
func (api *API) AccountRoles(ctx context.Context, accountID string) ([]AccountRole, error) {
uri := fmt.Sprintf("/accounts/%s/roles", accountID)
uri := fmt.Sprintf("/accounts/%s/roles?per_page=50", accountID)

res, err := api.makeRequestContext(ctx, http.MethodGet, uri, nil)
if err != nil {
Expand Down

0 comments on commit 8f84ec3

Please sign in to comment.