---
title: "PATCH /workspaces/{workspaceId}/permissions"
method: PATCH
path: "/workspaces/{workspaceId}/permissions"
---

# PATCH /workspaces/{workspaceId}/permissions

`PATCH /workspaces/{workspaceId}/permissions`

Updates which users in a workspace have the Grafana <code>Admin</code> or <code>Editor</code> roles.

## Path parameters

- `workspaceId` string, required

## Request body

- object
  - `updateInstructionBatch` UpdateInstruction[], required — An array of structures that contain the permission updates to make.
    - `action` 'ADD' | 'REVOKE', required — Specifies whether this update is to add or revoke role permissions.
    - `role` 'ADMIN' | 'EDITOR' | 'VIEWER', required — The role to add or revoke for the user or the group specified in <code>users</code>.
    - `users` User[], required — A structure that specifies the user or group to add or revoke the role for.
      - `id` string, required — <p>The ID of the user or group.</p> <p>Pattern: <code>^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$</code> </p>
      - `type` 'SSO_USER' | 'SSO_GROUP', required — Specifies whether this is a single user or a group.

## Response `200`

Success

- UpdatePermissionsResponse
  - `errors` UpdateError[], required — An array of structures that contain the errors from the operation, if any.
    - `code` integer, required — The error code.
    - `message` string, required — The message for this error.
    - `causedBy` object, required — Specifies which permission update caused the error.
      - `action` 'ADD' | 'REVOKE', required — Specifies whether this update is to add or revoke role permissions.
      - `role` 'ADMIN' | 'EDITOR' | 'VIEWER', required — The role to add or revoke for the user or the group specified in <code>users</code>.
      - `users` User[], required — A structure that specifies the user or group to add or revoke the role for.
        - `id` string, required — <p>The ID of the user or group.</p> <p>Pattern: <code>^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$</code> </p>
        - `type` 'SSO_USER' | 'SSO_GROUP', required — Specifies whether this is a single user or a group.

## Other responses

- `480` — ResourceNotFoundException
- `481` — ThrottlingException
- `482` — ValidationException
- `483` — AccessDeniedException
- `484` — InternalServerException

---

[API](https://skmtc.net/aws/apis/grafana.md) · [All operations](https://skmtc.net/aws/apis/grafana/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/grafana/versions/76cc5bd3d508/schema)
