Skip to content

List Roles

EndpointMethod
/api/admin/settings/rolesGET

Returns every admin role configured in the store in the { data, meta } envelope. A role is a named permission set assigned to admin users to control which areas of the admin panel they can access. Use it to populate a role picker, audit which roles exist, or look up a role's id before a detail / update / delete call.

Pagination

ParameterDescription
pagePage number, 1-based. Default 1.
per_pageItems per page. Default 10, max 50.

Filters

Query parameters that narrow the result. Supplying more than one narrows further — they combine with logical AND. They mirror the admin Roles datagrid filters.

ParameterMatchExample
namePartial (contains).?name=Catalog
permission_typeExact — all or custom.?permission_type=custom

Sorting

ParameterValues
sortid (default), name
orderasc, desc (default desc)

Both the compound form ?sort=name-asc and the split form ?sort=name&order=asc are accepted.

Notes

  • permissions is a string array of permission keys for a custom role. For an all role it is null (full access — no explicit key list is stored).
  • Seeded core roles (such as Administrator) may have null createdAt / updatedAt.

See the Roles overview for field meanings and behaviour.

Released under the MIT License.