Docs
Live demo
POST/api/v2/targets/{id}/accounts/adopt/preview

Infer the selected target-local account's live grants before full adoption. The operator must confirm or edit the returned rules and submit them to the adopt endpoint.

Parameters

Path1 required of 1
idstringpathrequired

Target ID (UUID)

Request body application/json · PreviewTargetAccountAdoptionRequest

Required1 of 1 fields
account_keyTargetAccountKeyRequestrequired
8 fields
enginestringrequired
postgresmysqlkubernetesclickhousemongodb
role_namestring
user_namestring
user_hoststring
subject_kindstring
ServiceAccountUserGroup
namestring
namespacestring
auth_sourcestring

Authentication database of a MongoDB user

Responses

200

Inferred adoption rules

PreviewTargetAccountAdoptionResponse · 9 fields
target_idstring
8 fields
enginestring
role_namestring
user_namestring
user_hoststring
subject_kindstring
namestring
namespacestring
auth_sourcestring
account_display_namestring
credential_ownershipstring
principal_managed
rulesarray of PolicyRuleResponse
3 fields
permissionsarray of string
resourcesarray of string
originstring (AccessOrigin)

Where a row of a rule came from: written in the rule, materialized from its template, or imported from the live account at adoption or by the one-off import after an upgrade. An imported row is part of the desired state like any other row.

ruletemplateimported
membershipsarray of PolicyMembershipResponse

Memberships of the account adoption takes into the rule (PostgreSQL), origin imported. Privileges the account holds only through a membership stay with the membership instead of becoming direct grants.

5 fields
rolestringrequired
admin_optionbooleanrequired
inheritboolean
setboolean
originstring (AccessOrigin)required

Where a row of a rule came from: written in the rule, materialized from its template, or imported from the live account at adoption or by the one-off import after an upgrade. An imported row is part of the desired state like any other row.

ruletemplateimported
2 fields
reasonstring
detailstring
warningsarray of string
signaturestring
409

The account can't be previewed yet (resource.conflict): Principal has not found it on the target, so the target needs a scan first.

Common errors: 400 401 403 404 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close