Gravitee Roles API

The Roles API from Gravitee — 10 operation(s) for roles.

Business capability
Identity & Access Management BC-620.20

Operations 18

GET /organizations/{orgId}/configuration/rolescopes List availables role scopes #
GET /organizations/{orgId}/configuration/rolescopes/{scope}/roles List of roles #
POST /organizations/{orgId}/configuration/rolescopes/{scope}/roles Create a role #
GET /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role} Get a role #
PUT /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role} Update a role #
DELETE /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role} Delete a role #
GET /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role}/users List users with the given role #
POST /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role}/users Add or update a role for a user #
DELETE /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role}/users/{userId} Delete the role for a given user #
GET /organizations/{orgId}/environments/{envId}/configuration/rolescopes List availables role scopes #
GET /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles List of roles #
POST /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles Create a role #
GET /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role} Get a role #
PUT /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role} Update a role #
DELETE /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role} Delete a role #
GET /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role}/users List users with the given role #
POST /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role}/users Add or update a role for a user #
DELETE /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role}/users/{userId} Delete the role for a given user #

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

🔗
ChangeLog
https://documentation.gravitee.io/apim/release-information/changelog
🔗
License
https://github.com/gravitee-io/gravitee-api-management/blob/master/LICENSE.txt
🔗
SDKs
https://github.com/gravitee-io/gravitee-clients-sdk
🔗
SDKs
https://github.com/gravitee-io/terraform-provider-apim
🔗
CLI
https://github.com/gravitee-io/graviteeio-cli
🔗
KubernetesOperator
https://github.com/gravitee-io/gravitee-kubernetes-operator
🔗
HelmChart
https://github.com/gravitee-io/helm-charts
🔗
DockerImage
https://hub.docker.com/r/graviteeio/apim-gateway
🔗
JSONLDContext
https://artifacts.apis.io/gravitee/json-ld/gravitee-context.jsonld
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_apidefinitions.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_apiv4definitions.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_apiresources.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_applications.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_subscriptions.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_managementcontexts.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_sharedpolicygroups.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_groups.yaml
🔗
KubernetesCRD
https://artifacts.apis.io/gravitee/crd/gravitee.io_notifications.yaml
🔗
Plans
https://artifacts.apis.io/gravitee/plans/gravitee-plans-pricing.yml
🔗
FinOps
https://artifacts.apis.io/gravitee/finops/gravitee-finops.yml
🔗
Reference
https://documentation.gravitee.io/am/reference/am-api-reference
🔗
ChangeLog
https://documentation.gravitee.io/am/releases-and-changelog/release-notes
🔗
License
https://github.com/gravitee-io/gravitee-access-management/blob/master/LICENSE
🔗
SDKs
https://github.com/gravitee-io/gravitee-access-management/tree/master/gravitee-am-management-api-sdk-java
🔗
HelmChart
https://github.com/gravitee-io/helm-charts/tree/master/helm/gravitee-am
🔗
DockerImage
https://hub.docker.com/r/graviteeio/am-gateway

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gravitee:gravitee-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gravitee-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gravitee.io - Management Roles API
  description: Some news resources are in alpha version. This implies that they are likely to be modified or even removed in future versions. They are marked with the 🧪 symbol
  version: 3.20.0
servers:
- url: http://localhost:8083/management
security:
- gravitee-auth: []
tags:
- name: Roles
paths:
  /organizations/{orgId}/configuration/rolescopes:
    get:
      tags:
      - Roles
      summary: List availables role scopes
      operationId: getRoleScopes
      parameters:
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '200':
          description: List of role scopes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleScopesLinkedHashMap'
        '500':
          description: Internal server error
  /organizations/{orgId}/configuration/rolescopes/{scope}/roles:
    get:
      tags:
      - Roles
      summary: List of roles
      description: User must have the MANAGEMENT_ROLE[READ] permission to use this service
      operationId: getRoles
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '200':
          description: Role successfully removed
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleEntity'
        '500':
          description: Internal server error
    post:
      tags:
      - Roles
      summary: Create a role
      description: User must have the MANAGEMENT_ROLE[CREATE] permission to use this service
      operationId: createRole
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewRoleEntity'
        required: true
      responses:
        '200':
          description: Role successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '500':
          description: Internal server error
  /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role}:
    get:
      tags:
      - Roles
      summary: Get a role
      description: User must have the MANAGEMENT_ROLE[READ] permission to use this service
      operationId: getRole
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '200':
          description: A role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '404':
          description: Role not found
        '500':
          description: Internal server error
    put:
      tags:
      - Roles
      summary: Update a role
      description: User must have the MANAGEMENT_ROLE[UPDATE] permission to use this service
      operationId: updateRole
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRoleEntity'
        required: true
      responses:
        '200':
          description: Role successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '404':
          description: Role not found
        '500':
          description: Internal server error
    delete:
      tags:
      - Roles
      summary: Delete a role
      description: User must have the MANAGEMENT_ROLE[DELETE] permission to use this service
      operationId: deleteRole
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '204':
          description: Role successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '404':
          description: Role not found
        '500':
          description: Internal server error
  /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role}/users:
    get:
      tags:
      - Roles
      summary: List users with the given role
      description: User must have the MANAGEMENT_ROLE[READ] permission to use this service
      operationId: getUsersPerRole
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '204':
          description: List of user's memberships
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MembershipListItem'
        '500':
          description: Internal server error
    post:
      tags:
      - Roles
      summary: Add or update a role for a user
      description: User must have the MANAGEMENT_ROLE[CREATE] and MANAGEMENT_ROLE[UPDATE] permission to use this service
      operationId: addRoleToUser
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleMembership'
        required: true
      responses:
        '201':
          description: Membership successfully created / updated
        '500':
          description: Internal server error
  /organizations/{orgId}/configuration/rolescopes/{scope}/roles/{role}/users/{userId}:
    delete:
      tags:
      - Roles
      summary: Delete the role for a given user
      description: User must have the MANAGEMENT_ROLE[DELETE] permission to use this service
      operationId: deleteRoleForUser
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '204':
          description: Role successfully removed
        '500':
          description: Internal server error
  /organizations/{orgId}/environments/{envId}/configuration/rolescopes:
    get:
      tags:
      - Roles
      summary: List availables role scopes
      operationId: getRoleScopes_1
      parameters:
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '200':
          description: List of role scopes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleScopesLinkedHashMap'
        '500':
          description: Internal server error
  /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles:
    get:
      tags:
      - Roles
      summary: List of roles
      description: User must have the MANAGEMENT_ROLE[READ] permission to use this service
      operationId: getRoles_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '200':
          description: Role successfully removed
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleEntity'
        '500':
          description: Internal server error
    post:
      tags:
      - Roles
      summary: Create a role
      description: User must have the MANAGEMENT_ROLE[CREATE] permission to use this service
      operationId: createRole_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewRoleEntity'
        required: true
      responses:
        '200':
          description: Role successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '500':
          description: Internal server error
  /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role}:
    get:
      tags:
      - Roles
      summary: Get a role
      description: User must have the MANAGEMENT_ROLE[READ] permission to use this service
      operationId: getRole_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '200':
          description: A role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '404':
          description: Role not found
        '500':
          description: Internal server error
    put:
      tags:
      - Roles
      summary: Update a role
      description: User must have the MANAGEMENT_ROLE[UPDATE] permission to use this service
      operationId: updateRole_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRoleEntity'
        required: true
      responses:
        '200':
          description: Role successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '404':
          description: Role not found
        '500':
          description: Internal server error
    delete:
      tags:
      - Roles
      summary: Delete a role
      description: User must have the MANAGEMENT_ROLE[DELETE] permission to use this service
      operationId: deleteRole_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '204':
          description: Role successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleEntity'
        '404':
          description: Role not found
        '500':
          description: Internal server error
  /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role}/users:
    get:
      tags:
      - Roles
      summary: List users with the given role
      description: User must have the MANAGEMENT_ROLE[READ] permission to use this service
      operationId: getUsersPerRole_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '204':
          description: List of user's memberships
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MembershipListItem'
        '500':
          description: Internal server error
    post:
      tags:
      - Roles
      summary: Add or update a role for a user
      description: User must have the MANAGEMENT_ROLE[CREATE] and MANAGEMENT_ROLE[UPDATE] permission to use this service
      operationId: addRoleToUser_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleMembership'
        required: true
      responses:
        '201':
          description: Membership successfully created / updated
        '500':
          description: Internal server error
  /organizations/{orgId}/environments/{envId}/configuration/rolescopes/{scope}/roles/{role}/users/{userId}:
    delete:
      tags:
      - Roles
      summary: Delete the role for a given user
      description: User must have the MANAGEMENT_ROLE[DELETE] permission to use this service
      operationId: deleteRoleForUser_1
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/RoleScope'
      - name: role
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: envId
        in: path
        description: The ID of the environment
        required: true
        schema:
          type: string
          default: DEFAULT
      - name: orgId
        in: path
        description: The ID of the Organization
        required: true
        schema:
          type: string
          default: DEFAULT
      responses:
        '204':
          description: Role successfully removed
        '500':
          description: Internal server error
components:
  schemas:
    NewRoleEntity:
      required:
      - name
      - scope
      type: object
      properties:
        default:
          type: boolean
        description:
          type: string
        name:
          maxLength: 2147483647
          minLength: 1
          type: string
        permissions:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        scope:
          $ref: '#/components/schemas/RoleScope'
    MembershipListItem:
      type: object
      properties:
        displayName:
          type: string
        id:
          type: string
        role:
          type: string
    RoleMembership:
      type: object
      properties:
        id:
          type: string
        reference:
          type: string
    RoleEntity:
      required:
      - id
      type: object
      properties:
        apiPrimaryOwner:
          type: boolean
        default:
          type: boolean
        description:
          type: string
        id:
          type: string
        name:
          type: string
        permissions:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        scope:
          $ref: '#/components/schemas/RoleScope'
        system:
          type: boolean
    UpdateRoleEntity:
      required:
      - id
      - name
      - scope
      type: object
      properties:
        default:
          type: boolean
        description:
          type: string
        id:
          type: string
        name:
          maxLength: 2147483647
          minLength: 1
          type: string
        permissions:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        scope:
          $ref: '#/components/schemas/RoleScope'
    RoleScope:
      type: string
      enum:
      - API
      - APPLICATION
      - GROUP
      - ENVIRONMENT
      - ORGANIZATION
      - PLATFORM
    RoleScopesLinkedHashMap:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
  securitySchemes:
    gravitee-auth:
      type: http
      scheme: basic