v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1425156138.7 KB

Creates a service account for the workspace. A service account can be used to call Grafana HTTP APIs, and run automated workloads. After creating the service account with the correct GrafanaRole for your use case, use CreateWorkspaceServiceAccountToken to create a token that can be used to authenticate and authorize Grafana HTTP API calls.

You can only create service accounts for workspaces that are compatible with Grafana version 9 and above.

For more information about service accounts, see Service accounts in the Amazon Managed Grafana User Guide.

For more information about the Grafana HTTP APIs, see Using Grafana HTTP APIs in the Amazon Managed Grafana User Guide.

post/workspaces/{workspaceId}/serviceaccounts

Path parameters

workspaceIdstring required

The ID of the workspace within which to create the service account.

Request body

namestring required

A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.

grafanaRole'ADMIN' | 'EDITOR' | 'VIEWER' required
<p>The permission level to use for this service account.</p> <note> <p>For more information about the roles and the permissions each has, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/Grafana-user-roles.html">User roles</a> in the <i>Amazon Managed Grafana User Guide</i>.</p> </note>

Response

Success

idstring required

The ID of the service account.

namestring required

The name of the service account.

grafanaRole'ADMIN' | 'EDITOR' | 'VIEWER' required

The permission level given to the service account.

workspaceIdstring required

The workspace with which the service account is associated.