Docs
Live demo

Get the account the last apply of a rule was refused for, to adopt it

GET/api/v2/policies/{id}/account-to-adopt
access:manageAPI token

The account on the target that the last apply of a personal rule was refused for, because it already exists and Principal neither created nor adopted it (resolution target.adopt_account). The console opens the Adopt window of this account with the person of the rule picked. Needs access:manage and targets:read: the account is only given to a caller who may see the accounts of the target. Job results, Activity, notifications and the audit never carry it.

Returns the unmanaged account that blocked the last apply (404 if none). Also requires targets:read.

Parameters

Path1 required of 1
idstringpathrequired

Policy ID (UUID)

Responses

200

OK

PolicyAccountToAdoptResponse · 5 fields
target_idstring · uuidrequired
identity_idstring · uuidrequired

The person of the rule, picked in the Adopt window.

account_keyentity.TargetAccountKeyrequired
8 fields
enginestring
role_namestring
user_namestring
user_hoststring
subject_kindstring
namestring
namespacestring
auth_sourcestring
account_labelstringrequired

The account as the target names it, for example boris or maria@%.

discoveredbooleanrequired

Whether the last discovery of the target found the account. Adopt needs it found. When it is false the console runs discovery of the target first.

404

Not Found - the rule is unknown, or its last apply wasn't refused for an account to adopt

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

↑ ↓ to moveEnter to openEsc to close