service-accounts

Change a service account's role.

Sets the service account's role, the one property of it that changes. Its keys and trust rules then act with the new role. The change is audited even when the role is unchanged.

Requires the serviceAccounts.update permission, which only the admin and owner roles hold. Personal access tokens and federated tokens are refused whatever their role.

patch/organizations/{organizationId}/service-accounts/{serviceAccountId}

Request

  • Base URL
    https://api.shorebird.dev/api/v1
  • Auth
    • HTTP bearer
    • or HTTP bearer

Request body

role'viewer' | 'developer' | 'appManager' | 'auditor' required

A role a service account can hold in its organization: a subset of Role. Never admin or owner, so a leaked key cannot manage the organization's members or its other service accounts.

Response

The service account, with its new role.

idinteger required

The service account's ID, which is also its user ID.

organization_idinteger required

The organization that owns the service account.

namestring required

The service account's name.

labelstring required

The name the service account is shown by, name[bot].

role'viewer' | 'developer' | 'appManager' | 'auditor' required

A role a service account can hold in its organization: a subset of Role. Never admin or owner, so a leaked key cannot manage the organization's members or its other service accounts.

created_atstring date-time required

When the service account was created.

created_by_user_idinteger nullable required

The user who created the service account, or null once that user has been deleted.

created_by_emailstring nullable required

The email of the user who created the service account, or null once that user has been deleted.

last_auth_atstring date-time nullable required

When the service account last authenticated, or null if it never has. Refreshed at most once a day.

Changes

No recorded changes to this operation across all 1 revision of this API.