Manage Profile Associations

Prev Next


Note: 
These APIs are supported only when the enhanced Britive profiles feature is enabled.

The following Britive API methods allow you to manage Britive profile associations. By default, the entire environment structure is selected. Users can choose to select a particular resource or environment.

1. Add Profile Association

The PATCH method allows you to add association to a profile. Only associations of type Environment are supported. This API is not supported for Azure, GCP and Oracle profiles.

PATCH{{url}}/api/paps/{{papID}}/scopes/{{envID}}

Request Example 

An example request is shown here.

curl --location --request PATCH '{{url}}/api/paps/{{papID}}/scopes/111222333444' \
--header 'Authorization: TOKEN {{token}}' 

Response Example 

Status: 204 No Content

2. Update Profile Associations

The POST method allows you to update associations for the profile.

POST{{url}}/api/paps/{{papID}}/scopes

Request Example 

An example request is shown here.

curl --location --request POST '{{url}}/api/paps/{{papID}}/scopes' \
--header 'Authorization: TOKEN {{token}}' \
--data-raw '[
{
   "type": "Environment",
   "value": "111222333444"
}

Response Example 

An example response is shown here:

[
   {
      "type": "Environment",
      "value": "111222333444",
      "papId": "cex2mf37an39dr99w349"
   }
]

3. Remove Profile Association

The DELETE method allows you to remove association from a profile. Only associations of type Environment are supported. This API is not supported for Azure, GCP and Oracle profiles.

DELETE{url}/api/paps/{papID}/scopes/{envID}

Request Example 

An example request is shown here.

curl --location --request DELETE '{{url}}/api/paps/{{papID}}/scopes/111222333444' \
--header 'Authorization: TOKEN {{token}}' 

Response Example 

Status: 204 No Content