client.serviceAccountsOperation 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.
/service-accountsserviceAccounts.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
/service-accountsserviceAccounts.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
/service-accounts/{id}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
/service-accounts/{id}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
/service-accounts/{id}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
/service-accounts/{id}/credentialsserviceAccounts.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
/service-accounts/{id}/credentials/{credentialId}/rotationserviceAccounts.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
/service-accounts/{id}/credentials/{credentialId}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
/service-accounts/{id}/resource-grantsserviceAccounts.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
/service-accounts/{id}/resource-grantsserviceAccounts.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
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 AsyncGeneratorErrors 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.