# Patch Role

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /be/v1/roles:
    patch:
      summary: Patch Role
      deprecated: false
      description: >-
        This endpoint creates a role in your  ROCKIT Edge Organization. You can
        modify the following permissions:


        - `apps`

        - `bundles`

        - `consumption`

        - `dependencies`

        - `deployments`

        - `keys`

        - `roles`

        - `activities`

        - `sources`

        - `subscriptions`

        - `tasks`

        - `trainings`

        - `users`


        ### Required Permissions


        `roles.update`


        See [Roles](https://edge.api.cloud.rockitplay.com/roles-3618377f0.md)
        for more details.
      tags:
        - ROCKIT Edge - Backend API/Roles
      parameters:
        - name: Authorization
          in: header
          description: >-
            Use the access token obtained from [`POST
            /be/v1/login`](https://edge.api.cloud.rockitplay.com/user-login-org-11611254e0.md)
            or [`POST
            /be/v1/refresh`](https://edge.api.cloud.rockitplay.com/refresh-11630082e0.md)
            as Bearer token. <br>Mutually excluded with `x-rockit-api-key`.
          required: true
          example: Bearer {{_edge_org_admin_access_token}}
          schema:
            type: string
        - name: x-rockit-tenant
          in: header
          description: >
            Unique and immutable organization identifier obtained from the
            ROCKIT Edge administrator. <br>Requires `x-rockit-tenant`,
            `x-rockit-username` and `x-rockit-api-key`.
          required: true
          example: '{{EDGE_TENANT_NAME}}'
          schema:
            type: string
        - name: x-rockit-orgname
          in: header
          description: >-
            Unique and immutable organization identifier obtained from the
            ROCKIT Edge administrator. <br>Requires `x-rockit-username` and
            `x-rockit-api-key`.
          required: true
          example: '{{EDGE_ORG_NAME}}'
          schema:
            type: string
        - name: x-rockit-username
          in: header
          description: >
            Unique and immutable username which is associated with the apikey.
            <br>Requires `x-rockit-tenant`, `x-rockit-orgname` and
            `x-rockit-api-key`.
          required: true
          example: adminPrincipal
          schema:
            type: string
        - name: x-rockit-api-key
          in: header
          description: >-
            Unique and immutable apikey which is associated with an machine
            user. <br>Mutually excluded with `Authorization` header. Requires
            `x-rockit-tenant`, `x-rockit-username` and `x-rockit-orgname`.
          required: true
          example: '{{_adminPrincipal_apiKey}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                apps:
                  type: integer
                  minimum: 0
                  maximum: 15
                bundles:
                  type: integer
                  minimum: 0
                  maximum: 15
                consumption:
                  type: integer
                  minimum: 0
                  maximum: 2
                dependencies:
                  type: integer
                  minimum: 0
                  maximum: 15
                deployments:
                  type: integer
                  minimum: 0
                  maximum: 15
                keys:
                  type: integer
                  minimum: 0
                  maximum: 15
                roles:
                  type: integer
                  minimum: 0
                  maximum: 15
                activities:
                  type: integer
                  minimum: 0
                  maximum: 2
                sources:
                  type: integer
                  minimum: 0
                  maximum: 15
                subscriptions:
                  type: integer
                  minimum: 0
                  maximum: 15
                tasks:
                  type: integer
                  minimum: 0
                  maximum: 31
                trainings:
                  type: integer
                  minimum: 0
                  maximum: 6
                users:
                  type: integer
                  minimum: 0
                  maximum: 15
              required:
                - name
              x-apidog-orders:
                - name
                - apps
                - bundles
                - consumption
                - dependencies
                - deployments
                - keys
                - roles
                - activities
                - sources
                - subscriptions
                - tasks
                - trainings
                - users
              x-apidog-ignore-properties: []
            example:
              name: exampleName
              apps: 1
              beUsers: 15
              bundles: 6
              consumption: 1
              dependencies: 12
              deployments: 3
              keys: 11
              roles: 15
              sources: 12
              subscriptions: 12
              tasks: 20
              trainings: 2
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Indicates that the app creation operation was successful.
                  message:
                    type: string
                    description: >-
                      A confirmation message (e.g., "app created") confirming
                      that the new app has been registered.
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: Success
                  value:
                    status: success
                    message: role updated
                '2':
                  summary: '400: missing-param'
                  value:
                    status: failed
                    error: missing-param
                    message: x-rockit-beauth-token missing
                    detail: header parameter x-rockit-beauth-token is required
                '3':
                  summary: '401: token-expired'
                  value:
                    status: failed
                    error: token-expired
                    message: expired token
                '4':
                  summary: '409: item-exists'
                  value:
                    status: failed
                    error: item-exists
                    message: cannot create app
                    detail: app with name 'sushi' exists already
          headers: {}
          x-apidog-name: '200: success'
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Reflects that the creation failed due to one or more
                      invalid or missing parameters in the request.
                  error:
                    type: string
                    description: Contains an error identifier.  (e.g., "invalid-param")
                  message:
                    type: string
                    description: >-
                      Explains the nature of the invalid input (for example,
                      "name invalid").
                  detail:
                    type: string
                    description: >-
                      Offers further context on the error. (e.g., expected
                      pattern for the organization name)
                x-apidog-orders:
                  - 01JQNHCK7PQHGVBC9MTBHYNN1B
                required:
                  - status
                  - error
                  - message
                  - detail
                x-apidog-refs:
                  01JQNHCK7PQHGVBC9MTBHYNN1B:
                    $ref: '#/components/schemas/Invalid%20Param'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
                  - detail
          headers: {}
          x-apidog-name: '400: missing-param'
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the organization creation request was
                      rejected because of authentication problems.
                  error:
                    type: string
                    description: Contains an error identifier. (e.g."unauthorized")
                  message:
                    type: string
                    description: >-
                      Provides details such as "invalid token" to help diagnose
                      the failure.
                x-apidog-orders:
                  - 01JQNHCZ8E3JRQ2PAD8MFXTDRV
                required:
                  - status
                  - error
                  - message
                x-apidog-refs:
                  01JQNHCZ8E3JRQ2PAD8MFXTDRV:
                    $ref: '#/components/schemas/unauthorized'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
          headers: {}
          x-apidog-name: '401: token-expired'
        '409':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the request failed because an organization
                      with the same identifier already exists or is protected.
                  error:
                    type: string
                    description: Contains an error identifier.  (e.g., "item exists")
                  message:
                    type: string
                    description: >-
                      States that the organization cannot be created due to a
                      conflict.
                  detail:
                    type: string
                    description: Provides additional context.
                x-apidog-orders:
                  - 01JQNHDC3R8Z6A1EJ3FHHCQGJZ
                required:
                  - status
                  - error
                  - message
                  - detail
                x-apidog-refs:
                  01JQNHDC3R8Z6A1EJ3FHHCQGJZ:
                    $ref: '#/components/schemas/Item-exists'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
                  - detail
          headers: {}
          x-apidog-name: '409: item-exists'
      security: []
      x-apidog-folder: ROCKIT Edge - Backend API/Roles
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/732774/apis/api-16569733-run
components:
  schemas:
    Invalid Param:
      type: object
      properties:
        status:
          type: string
          description: >-
            Reflects that the creation failed due to one or more invalid or
            missing parameters in the request.
        error:
          type: string
          description: Contains an error identifier.  (e.g., "invalid-param")
        message:
          type: string
          description: >-
            Explains the nature of the invalid input (for example, "name
            invalid").
        detail:
          type: string
          description: >-
            Offers further context on the error. (e.g., expected pattern for the
            organization name)
      required:
        - status
        - error
        - message
        - detail
      x-apidog-orders:
        - status
        - error
        - message
        - detail
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    unauthorized:
      type: object
      properties:
        status:
          type: string
          description: >-
            Indicates that the organization creation request was rejected
            because of authentication problems.
        error:
          type: string
          description: Contains an error identifier. (e.g."unauthorized")
        message:
          type: string
          description: >-
            Provides details such as "invalid token" to help diagnose the
            failure.
      required:
        - status
        - error
        - message
      x-apidog-orders:
        - status
        - error
        - message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Item-exists:
      type: object
      properties:
        status:
          type: string
          description: >-
            Indicates that the request failed because an organization with the
            same identifier already exists or is protected.
        error:
          type: string
          description: Contains an error identifier.  (e.g., "item exists")
        message:
          type: string
          description: States that the organization cannot be created due to a conflict.
        detail:
          type: string
          description: Provides additional context.
      required:
        - status
        - error
        - message
        - detail
      x-apidog-orders:
        - status
        - error
        - message
        - detail
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    Bearer token:
      type: bearer
      scheme: bearer
      description: >-
        Enter your Access Token. You can obtain this by calling the /be/v1/login
        endpoint. Use the Refresh token to get a new Access token when it
        expires.
servers:
  - url: https://Example-Server.com
    description: Default
security: []

```
