TeamGriddeveloper
TeamGrid Developer

serviceAccounts SDK client

10 typed @teamgrid/api-client methods for Service Accounts, Credentials, plus 1 convenience helper.

Client propertyclient.serviceAccounts
Mapped operations10
API groupsService Accounts, Credentials

Operation methods

Parameter declarations below are taken from the pinned TypeScript source. Request fields and responses are summarized from the matching OpenAPI operation; follow the API link for every field, constraint, example, and error description.

GET/service-accounts
Full API operation →

serviceAccounts.list

Use this operation to list service accounts. It returns only resources visible to the credential and applies the documented filters before producing a bounded, stable page. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.

client.serviceAccounts.list(options?: ListOptions)
Return form
Promise
Operation ID
listServiceAccounts
Required scopes
service-accounts:read
SDK parameters
options: ListOptions
Query request fields
cursor?: stringlimit?: integer
Success
200 Array<ServiceAccount> envelope
Declared API errors
400401403429503
POST/service-accounts
Full API operation →

serviceAccounts.create

Creates native v2 key material in the credential home cell. The token is returned only by this private no-store response and exact idempotent replays retained for seven days.

client.serviceAccounts.create(data: ServiceAccountCreate, options: MutationOptions = {})
Return form
Promise
Operation ID
createServiceAccount
Required scopes
service-accounts:write
SDK parameters
data: ServiceAccountCreateoptions: MutationOptions
Header request fields
Idempotency-Key: string
Request body
ServiceAccountCreateapplication/json
Success
200 ServiceAccountCredential envelope201 ServiceAccountCredential envelope
Declared API errors
400401403409429502503
GET/service-accounts/{id}
Full API operation →

serviceAccounts.get

Use this operation to get a service account. It returns the resource only when it belongs to the authenticated workspace and is visible to the credential. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.

client.serviceAccounts.get(id: string, options?: RequestOptions)
Return form
Promise
Operation ID
getServiceAccount
Required scopes
service-accounts:read
SDK parameters
id: stringoptions: RequestOptions
Path request fields
id: string
Success
200 ServiceAccount envelope
Declared API errors
400401403404429503
PATCH/service-accounts/{id}
Full API operation →

serviceAccounts.update

Use this operation to enable or disable a service account. Only documented mutable fields are accepted; omitted fields retain their current values unless the request schema states replacement semantics. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.

client.serviceAccounts.update(id: string, data: ServiceAccountUpdate, options?: RequestOptions)
Return form
Promise
Operation ID
updateServiceAccount
Required scopes
service-accounts:write
SDK parameters
id: stringdata: ServiceAccountUpdateoptions: RequestOptions
Path request fields
id: string
Request body
ServiceAccountUpdateapplication/json
Success
200 ServiceAccount envelope
Declared API errors
400401403404409429502503
DELETE/service-accounts/{id}
Full API operation →

serviceAccounts.revoke

Use this operation to permanently revoke a service account. The operation preserves TeamGrid lifecycle and permission rules instead of bypassing them with a direct data deletion. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.

client.serviceAccounts.revoke(id: string, options?: RequestOptions)
Return form
Promise
Operation ID
revokeServiceAccount
Required scopes
service-accounts:write
SDK parameters
id: stringoptions: RequestOptions
Path request fields
id: string
Success
204
Declared API errors
400401403404409429502503
POST/service-accounts/{id}/credentials
Full API operation →

serviceAccounts.createCredential

Creates native v2 key material in the credential home cell. The token is returned only by this private no-store response and exact idempotent replays retained for seven days.

client.serviceAccounts.createCredential(id: string, data: ServiceAccountCredentialCreate, options: MutationOptions = {})
Return form
Promise
Operation ID
createServiceAccountCredential
Required scopes
credentials:writeservice-accounts:write
SDK parameters
id: stringdata: ServiceAccountCredentialCreateoptions: MutationOptions
Header request fields
Idempotency-Key: string
Request body
ServiceAccountCredentialCreateapplication/json
Success
200 ServiceAccountCredential envelope201 ServiceAccountCredential envelope
Declared API errors
400401403409429502503
POST/service-accounts/{id}/credentials/{credentialId}/rotation
Full API operation →

serviceAccounts.rotateCredential

Issues one successor generation, places the predecessor in a bounded retiring grace period, and reveals the successor only in this no-store response or an exact idempotent replay.

client.serviceAccounts.rotateCredential(id: string, credentialId: string, data: ServiceAccountCredentialRotation = {}, options: MutationOptions = {})
Return form
Promise
Operation ID
rotateServiceAccountCredential
Required scopes
credentials:writeservice-accounts:write
SDK parameters
id: stringcredentialId: stringdata: ServiceAccountCredentialRotationoptions: MutationOptions
Header request fields
Idempotency-Key: string
Request body
ServiceAccountCredentialRotationapplication/json
Success
200 ServiceAccountCredential envelope201 ServiceAccountCredential envelope
Declared API errors
400401403409429502503
DELETE/service-accounts/{id}/credentials/{credentialId}
Full API operation →

serviceAccounts.revokeCredential

Use this operation to revoke a service account credential. The operation preserves TeamGrid lifecycle and permission rules instead of bypassing them with a direct data deletion. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.

client.serviceAccounts.revokeCredential(id: string, credentialId: string, options?: RequestOptions)
Return form
Promise
Operation ID
revokeServiceAccountCredential
Required scopes
credentials:writeservice-accounts:write
SDK parameters
id: stringcredentialId: stringoptions: RequestOptions
Path request fields
id: string
Success
204
Declared API errors
400401403404409429502503
GET/service-accounts/{id}/resource-grants
Full API operation →

serviceAccounts.getResourceGrants

Use this operation to get the complete service account resource grant set. It returns the resource only when it belongs to the authenticated workspace and is visible to the credential. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.

client.serviceAccounts.getResourceGrants(id: string, options?: RequestOptions)
Return form
Promise
Operation ID
getServiceAccountResourceGrants
Required scopes
resource-grants:readservice-accounts:read
SDK parameters
id: stringoptions: RequestOptions
Path request fields
id: string
Success
200 ServiceAccountResourceGrantSet envelope
Declared API errors
400401403404429503
PUT/service-accounts/{id}/resource-grants
Full API operation →

serviceAccounts.replaceResourceGrants

Atomically replaces the complete grant policy. Partial and stale publications fail closed.

client.serviceAccounts.replaceResourceGrants(id: string, data: ServiceAccountResourceGrantSetReplace, ifMatch: string, options?: RequestOptions)
Return form
Promise
Operation ID
replaceServiceAccountResourceGrants
Required scopes
resource-grants:writeservice-accounts:write
SDK parameters
id: stringdata: ServiceAccountResourceGrantSetReplaceifMatch: stringoptions: RequestOptions
Header request fields
If-Match: string
Request body
ServiceAccountResourceGrantSetReplaceapplication/json
Success
200 ServiceAccountResourceGrantSet envelope
Declared API errors
400401403412428429502503

Convenience helpers

These typed helpers compose mapped operations. They do not grant scopes or bypass API limits.

serviceAccounts.pages

Iterate cursor pages with a bounded PaginationOptions policy.

client.serviceAccounts.pages(options?: ListOptions, pagination?: PaginationOptions)
Returns AsyncGenerator

Errors and transport metadata

HTTP failures reject with TeamGridApiError, including the status, stable error documents, request ID, optional retry delay, and transport metadata. Local validation, routing, timeout, response-size, and pagination failures reject withTeamGridClientError and a stable client error code. Successful envelopes expose non-enumerable transport metadata.

See pagination and errors andclient configuration for handling guidance.

Stable documentation · Developer Platform · Reviewed 2026-08-10Edit this page ↗
Documentation feedbackWas this page useful?
Esc

Search TeamGrid Developer

Find guides, concepts and every API operation.