---
title: "List Portal Roles"
url: "https://nov18-dev.movespot.fyi/apis/portal-management-2/versions/5611abf1-a964-48d3-9512-55f58a30ef37/operations/list-portal-roles"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/portal-management-2/versions/5611abf1-a964-48d3-9512-55f58a30ef37.md

# List Portal Roles

`GET` `/portal-roles`

Operation ID: `list-portal-roles`

List roles that can be assigned to teams in a portal. Each role provides a set of permissions to perform an action on a resource.

## Responses

- `200` - A set of roles available in portals.
- `401` - Unauthorized
- `403` - Forbidden

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Portal Management
  version: 2.2.2
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /portal-roles:
    get:
      operationId: list-portal-roles
      summary: List Portal Roles
      description: List roles that can be assigned to teams in a portal. Each role
        provides a set of permissions to perform an action on a resource.
      responses:
        "200":
          $ref: "#/components/responses/ListRoles"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
      tags:
        - Portal Team Roles
security:
  - personalAccessToken: []
  - systemAccountAccessToken: []
components:
  responses:
    ListRoles:
      description: A set of roles available in portals.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ListRolesResponse"
          examples:
            Example 1:
              $ref: "#/components/examples/ListRolesExample1"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
  schemas:
    ListRolesResponse:
      description: The set of roles available to associate with resources and assign
        to teams.
      type: object
      properties:
        services:
          type: object
          properties:
            name:
              type: string
              enum:
                - Services
            roles:
              type: object
              properties:
                apiviewer:
                  type: object
                  properties:
                    name:
                      type: string
                      enum:
                        - API Viewer
                    description:
                      type: string
                      enum:
                        - API Viewers have read-only access to the documentation
                          of a service in a portal
                  required:
                    - name
                    - description
                apiconsumer:
                  type: object
                  properties:
                    name:
                      type: string
                      enum:
                        - API Consumer
                    description:
                      type: string
                      enum:
                        - API Consumers can make calls to the given service
                  required:
                    - name
                    - description
              required:
                - apiviewer
                - apiconsumer
          required:
            - name
            - roles
      example:
        services:
          name: Services
          roles:
            apiviewer:
              name: API Viewer
              description: API Viewers have read-only access to the documentation of a service
                in a portal
            apiconsumer:
              name: API Consumer
              description: API Consumers can make calls to the given service
      required:
        - services
      title: ListRolesResponse
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  examples:
    ListRolesExample1:
      value:
        services:
          name: Services
          roles:
            apiviewer:
              name: API Viewer
              description: API Viewers have read-only access to the documentation of a service
                in a portal
            apiconsumer:
              name: API Consumer
              description: API Consumers can make calls to the given service
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
  securitySchemes:
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs.

        You can generate a Personal Access Token (PAT) from the [personal access
        token page](https://cloud.konghq.com/global/account/tokens/) in the
        Konnect dashboard.

        The PAT token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer kpat_xgfT...'`
    systemAccountAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The system account access token is meant for automations and
        integrations that are not directly associated with a human identity.

        You can generate a system account Access Token by creating a system
        account and then obtaining a system account access token for that
        account.

        The access token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer spat_i2Ej...'`
```
