Manage Britive-managed Permissions

Prev Next

1. Create a Britive-managed Permission

The POST method allows you to create a new permission for a specified profile in the system.

POST

{{url}}/api/apps/{appId}/britive-managed/permissions

Request Parameters

The request parameters used in this method are shown in the following table:

Parameter

Description

Data Type

Required

appId

The application Id.

string

Mandatory

Request Example 

An example request is shown here.

curl --location --request POST '{{url}}/api/apps/{appId}/britive-managed/permissions' \
--header 'Authorization: TOKEN {{token}}' \
--data-raw 
'{
  "name": "DevAccessPermission",
  "description": "Permission to access develop environment",
  "type": "role",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "childPermissions": [
    {
      "name": "DevAdminPolicy",
      "type": "inlinePolicy",
      "permissionDefinition": {}
    }
  ]
}'

Response Example 

An example response is shown here:

{
  "id": "string",
  "name": "DevAccessPermission",
  "description": "Permission to access develop environment",
  "type": "role",
  "isPrivileged": true,
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "permissionDefinition": {},
  "createdDate": "string",
  "createdBy": "string",
  "updatedDate": "string",
  "updatedBy": "string",
  "childPermissions": [
    {
      "name": "DevAdminPolicy",
      "type": "inlinePolicy",
      "permissionDefinition": {},
      "isPrivileged": true
    }
  ]
}

2. Get all Britive-managed Permissions

The GET method returns the Britive-managed permissions.

GET

{{url}}/api/apps/{appId}/britive-managed/permissions

Request Parameters

The request parameters used in this method are shown in the following table:

Parameter

Description

Data Type

Required

appId

The application ID.

string

Mandatory

filter

Parameter to filter permissions by name.

string

Optional

searchText

Parameter to filter permissions by search text.

string

Optional

page

The page number starts from zero.

integer

Optional

size

The number of records that are returned. 

Note: The total number of records can be used to calculate the number of pages. For example, 20.

integer

Optional

sort

Parameter to sort the Name column.

string

Optional

Request Example 

An example request is shown here.

curl -X GET '{{url}}/api/apps/{appId}/britive-managed/permissions?page=0&size=20&sort=name,asc&filter=name eq Role'

Response Example 

An example response is shown here:

{
  "count" : 1,
  "page" : 0,
  "size" : 20,
  "sort" : "name: ASC",
  "data" : [ {
    "id" : "wm1p9i5adtwt8xetgb44",
    "name" : "Apollo@AWS-1",
    "description" : "Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1Apollo@AWS-1",
    "profileCount" : 1,
    "associatedEnvironments" : [ "196226166352", "378563640942" ],
    "provisionedEnvironments" : null,
    "outOfSyncEnvironments" : [ "378563640942" ],
    "createdDate" : "2024-03-06 06:47:58",
    "createdBy" : "B",
    "updatedDate" : null,
    "updatedBy" : null,
    "isPrivileged" : true
  }]
}

Status: 200 OK

3. Get a Britive-managed Permission by ID

This GET method returns details of a Britive-managed permission specified by <permissionId>.

GET

{{url}}/api/apps/{appId}/britive-managed/permissions/{permissionId}

Request Parameters

The request parameters used in this method are shown in the following table:

Parameter

Description

Data Type

Required

appId

The application Id.

string

Mandatory

permissionId

The permission Id.

string

Mandatory

An example request is shown here.

curl -X GET '{{url}}/api/apps/{appId}/britive-managed/permissions/{permissionId}'

Response Example 

An example response is shown here:

{
  "id": "string",
  "name": "DevAccessPermission",
  "description": "Permission to access develop environment",
  "type": "role",
  "isPrivileged": true,
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "permissionDefinition": {},
  "createdDate": "string",
  "createdBy": "string",
  "updatedDate": "string",
  "updatedBy": "string",
  "childPermissions": [
    {
      "name": "DevAdminPolicy",
      "type": "inlinePolicy",
      "permissionDefinition": {},
      "isPrivileged": true
    }
  ]
}

Status: 200 OK

4. Delete Britive-managed Permission

This DELETE method deletes a Britive-managed permission for a specified <permissionId>.

DELETE

{{url}}/api/apps/{appId}/britive-managed/permissions/{permissionId}

Request Parameters

The request parameters used in this method are shown in the following table:

Parameter

Description

Data Type

Required

appId

The application Id.

string

Mandatory

permissionId

The permission Id.

string

Mandatory

Request Example

curl --location --request DELETE '{{url}}/api/apps/{appId}/britive-managed/permissions/{permissionId}' \
--header 'Authorization: TOKEN {{token}}'

Response Example 

Status: 204 No Content

5. Validate Britive-managed Permission

The POST method validates Britive-managed permissions..

POST

{{url}}/api/apps/{appId}/britive-managed/permissions/validate

Request Parameters

The request parameters used in this method are shown in the following table:

Parameter

Description

Data Type

Required

appId

The application ID.

string

Mandatory

Request Example

curl ‐‐location ‐‐request POST '{{url}}/api/apps/{appId}/britive-managed/permissions/validate \
‐‐header 'Authorization: TOKEN {{token}}' \
‐‐data‐raw
'{
"Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Sid": "VisualEditor01",
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

Response Example 

Status: 200 OK

6. Add Britive-managed Permission to application from Access Builder

The POST method adds Britive-managed permission to the application from Access Builder.

POST

{{url}}/api/profile-requests/apps/{appId}/britive-managed/permissions

Request Parameters

The request parameters used in this method are shown in the following table:

Parameter

Description

Data Type

Required

appId

The application Id.

string

Mandatory

Request Example 

An example request is shown here.

curl ‐‐location ‐‐request POST '{{url}}/api/profile‐requests/apps/{appId}/britive‐managed/permissions \
‐‐header 'Authorization: TOKEN {{token}}' \
‐‐data‐raw
'{
  "name": "DevAccessPermission",
  "description": "Permission to access develop environment",
  "type": "role",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "childPermissions": [
    {
      "name": "DevAdminPolicy",
      "type": "inlinePolicy",
      "permissionDefinition": {}
    }
  ]
}

Response Example 

An example response is shown here:

{
  "id": "string",
  "name": "DevAccessPermission",
  "description": "Permission to access develop environment",
  "type": "role",
  "isPrivileged": true,
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "permissionDefinition": {},
  "createdDate": "string",
  "createdBy": "string",
  "updatedDate": "string",
  "updatedBy": "string",
  "childPermissions": [
    {
      "name": "DevAdminPolicy",
      "type": "inlinePolicy",
      "permissionDefinition": {},
      "isPrivileged": true
    }
  ]
}

Status: 200 OK

7. Get Britive-managed Permissions from Access Builder

This GET method returns details of a role for a specified <permissionId>.

GET

{{url}}/api/profile-requests/apps/{appId}/britive-managed/permissions/{permissionId}

Request Parameters

The request parameters used in this method are shown in the following table:

Parameter

Description

Data Type

Required

appId

The application ID.

string

Mandatory

permissionId

The permission Id.

string

Mandatory

Request Example 

curl -X GET '{{url}}/api/profile-requests/apps/{appId}/britive-managed/permissions/{permissionId}'

Response Example 

An example response is shown here:

{
  "id": "string",
  "name": "DevAccessPermission",
  "description": "Permission to access develop environment",
  "type": "role",
  "isPrivileged": true,
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "permissionDefinition": {},
  "createdDate": "string",
  "createdBy": "string",
  "updatedDate": "string",
  "updatedBy": "string",
  "childPermissions": [
    {
      "name": "DevAdminPolicy",
      "type": "inlinePolicy",
      "permissionDefinition": {},
      "isPrivileged": true
    }
  ]
}

Status: 200 OK

8. Validate Permission from Access Builder

The POST method validates permission from Access Builder.

POST

{{url}}/api/profile-requests/apps/{appId}/britive-managed/permissions/validate

Request Example

curl ‐‐location ‐‐request POST '{{url}}/api/profile‐requests/apps/{appId}/britive‐managed/permissions/validate \
‐‐header 'Authorization: TOKEN {{token}}' \
‐‐data‐raw
'{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Sid": "VisualEditor01",
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

Response Example 

An example response is shown here:

Status: 200 OK

9. Findings for Permission from Access Builder

The GET method validates permission and policy from Access Builder.

GET

{{url}}/api/profile-requests/apps/{appId}/britive-managed/permissions/{permId}/findings

Request Example

curl ‐‐location ‐‐request GET '{{url}}/api/profile-requests/apps/{appId}/britive-managed/permissions/{permId}/findings \
‐‐header 'Authorization: TOKEN {{token}}' \

Response Example 

An example response is shown here:

Status: 200 OK