Set the list of projects the Agent will be restricted to only when the agent has the property restrictedAccess set to true. If projects are empty, this will remove all projects the agent is restricted to, effectively making the agent inaccessible to any project when the agent property has restrictedAccess set to true.
Please keep in mind that by using endpoint you are setting the allow list and so this will overwrite any previously set values, if you want to simply update the existing allow list please refer to the PATCH endpoint.
NOTE: Whilst the Agent property restrictedAccess is set to false, any amendments will not be enforced until restrictedAccess is set to true.
a valid bearer token
The ID of the agent having the allow list set
The list of projects the Agent is allowed to be scoped to. Each project should be provided as an object with the Project ID, or the list can be left empty.
{
"projects": {
"3fa85f64-5717-4562-b3fc-2c963f66afa6": { "environments": ["dev", "prod"] },
"1398aa31-af57-4a6a-9752-27c2e8556c3f": {}
}
}Agent allow list successfully updated