---
title: "Get list of roles"
method: GET
path: "/api/license-manager/site/pvt/roles/list/paged"
tags: ["Roles"]
---

# Get list of roles

`GET /api/license-manager/site/pvt/roles/list/paged`

## Request

- Base URL: `https://apiexamples.vtexcommercestable.com.br`
- URL: `https://apiexamples.vtexcommercestable.com.br/api/license-manager/site/pvt/roles/list/paged`
- Auth: one of:
  - API key in header `X-VTEX-API-AppKey` and API key in header `X-VTEX-API-AppToken`
  - API key in header `VtexIdclientAutCookie`

Returns a list of License Manager [roles](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc). The response is divided in pages. The query parameter `numItems` defines the number of items in each page, and consequently the amount of pages for the whole list. 

## Permissions

Any user or [API key](https://developers.vtex.com/docs/guides/api-authentication-using-api-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:

| **Product** | **Category** | **Resource** |
| --------------- | ----------------- | ----------------- |
| License Manager | Services access control | **Get paged roles** |

There are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).

>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing API keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.

## Query parameters

- `numItems` integer
- `pageNumber` integer
- `sort` string
- `sortType` string

## Headers

- `Content-Type` string, required
- `Accept` string, required

## Response `200`

Success

- ListRolesResponse: Response body for listing all roles.
  - `items` RoleItems[]: Array of role objects.
    - `id` integer: ID of the role.
    - `isAdmin` boolean: Defines if the role has administrative access (`true`) or not (`false`).
    - `roleType` integer: Returns `1` for custom roles, and `0` for predefined roles.
    - `products` ProductItems[]: Array of License Manager product objects.
      - `id` string, nullable: License Manager product ID.
      - `categoryId` string, nullable: Category ID.
      - `categoryName` string, nullable: Category name.
      - `description` string, nullable: Description.
      - `consoleUrlMask` string, nullable: Console URL mask.
      - `urlConfiguration` string, nullable: URL configuration.
      - `webApiUrlMask` string, nullable: Web API mask.
      - `url` string, nullable: URL.
      - `productResources` string, nullable: Product resources.
      - `name` string: Name of the License Manager product.
    - `resources` string, nullable: Resources.
    - `logins` string, nullable: Logins.
    - `name` string: Name of the role.
  - `paging` Paging: Paging object.
    - `page` integer, required: Current page number.
    - `perPage` integer, required: Items per page.
    - `total` integer, required: Total of items.
    - `pages` integer, required: Total of pages.

## Changes

- **2023-10-11** `1f25afb9537d`: 4 breaking
  - for the `query` request parameter `numItems`, default value `10` was removed
  - for the `query` request parameter `pageNumber`, default value `1` was removed
  - for the `query` request parameter `sort`, default value `id` was removed
  - for the `query` request parameter `sortType`, default value `ASC` was removed
- **2023-10-11** `fcf61fb140f2`: 1 breaking
  - added the new required `header` request parameter `Accept`
- **2022-01-28** `ca8bd421f133`: 2 warning
  - deleted the `path` request parameter `accountName`
  - deleted the `path` request parameter `environment`
- **2021-11-16** `000842297d2a`: 3 breaking, 11 info
  - for the `query` request parameter `numItems`, default value was changed from `10` to `10`
  - for the `query` request parameter `pageNumber`, default value was changed from `1` to `1`
  - the `items/items/id` response's property type changed from `string` to `integer` for status `200`
  - response property `items/items/logins` deprecated
  - …10 more
- **2021-11-09** `7a2ee1e98a24`: 1 info
  - added the media type `application/json` for the response with the status `200`

[Operation history](https://skmtc.dev/vtex/apis/license-manager-api/changes/api/license-manager/site/pvt/roles/list/paged/get.md)

---

[API](https://skmtc.dev/vtex/apis/license-manager-api.md) - [All operations](https://skmtc.dev/vtex/apis/license-manager-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vtex/apis/license-manager-api/revisions/a7dd68911d51?raw)
