Apply Lifecycle
POST
/v1/admin/principal-assignments/lifecycle/apply
const url = 'https://example.com/v1/admin/principal-assignments/lifecycle/apply';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"tenant_id":"default","proposal_id":"example","subject_key":"example","principal_type":"human","target_group_paths":["example"],"reason_code":"lifecycle_apply","source":"hr-event","attributes":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/admin/principal-assignments/lifecycle/apply \ --header 'Content-Type: application/json' \ --data '{ "tenant_id": "default", "proposal_id": "example", "subject_key": "example", "principal_type": "human", "target_group_paths": [ "example" ], "reason_code": "lifecycle_apply", "source": "hr-event", "attributes": {} }'Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
PrincipalLifecycleApplyIn
object
tenant_id
Tenant Id
string
proposal_id
required
Proposal Id
string
subject_key
required
Subject Key
string
principal_type
Principal Type
string
target_group_paths
Target Group Paths
Array<string>
reason_code
Reason Code
string
source
Source
string
attributes
Attributes
object
key
additional properties
any
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
PrincipalLifecycleApplyOut
object
created_count
Created Count
integer
revoked_count
Revoked Count
integer
unchanged_count
Unchanged Count
integer
created_paths
Created Paths
Array<string>
revoked_paths
Revoked Paths
Array<string>
Example
{ "created_count": 0, "revoked_count": 0, "unchanged_count": 0}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}