Manage My Access
    • PDF

    Manage My Access

    • PDF

    Article summary

    You can use the following Britive API methods to manage the access-related operations of users.


    1. Profiles of a User

    The GET method returns all the profiles associated with the user with an API token.

    GET
    {{url}}/api/access

    Request Example

    An example GET request for retrieving user profiles is shown here:

    curl --location --request GET '{{url}}/api/access' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    An example response of the GET request for retrieving user profiles is shown here:

    Status: 200 OK
    [
        {
            "appContainerId": "dY4nLiFRMMPzmQz72FsK",
            "appName": "App1",
            "appDescription": "",
            "catalogAppName": "AWS",
            "programmaticAccess": true,
            "profiles": [
                {
                    "profileId": "13m3ud7zer5o7uge5yle",
                    "profileName": "S3 Full Access",
                    "profileDescription": "",
                    "environments": [
                        {
                            "environmentId": "1111",
                            "environmentName": "2222 (Labs)",
                            "environmentDescription": "",
                            "alternateEnvironmentName": "Labs",
                            "accountId": "1111"
                        },
                        {
                            "environmentId": "2222",
                            "environmentName": "2222 (Dev)",
                            "environmentDescription": "",
                            "alternateEnvironmentName": "Dev",
                            "accountId": "2222"
                        }
                    ]
                }
            ]
        }
    ]

    2. Frequently-used profiles

    This API returns all the frequently-used profiles for the logged-in user.

    GET{{url}}/api/access/frequently-used

    Request Example

    An example GET request for retrieving all the frequently-used profiles for the logged-in user is shown here:

    curl --location --request GET '{{url}}/api/access/frequently-used' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    An example response of the GET request for retrieving all the frequently-used profiles for the logged-in user is shown here:

    Status: 200 OK
    [
        {
            "appContainerId": "40bab4bsd246u7y55duf",
            "environmentId": "951817868444",
            "papId": "mrffc41j3jljd5z9s6vu",
            "frequency": 11,
            "myAccessDetails": {
                "checkOutTime": "2021-02-26T04:29:52Z",
                "checkInTime": "2021-02-26T04:48:54Z"
            }
        }
    ]

    3. Favorite profiles

    This API returns all profiles marked as favorites for the logged-in user.

    GET{{url}}/api/access/favorites/accessTypeRequired=true

    Request Parameters

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

    ParameterDescriptionData TypeRequired

    accessTypeRequired

    If this value is set to true, accessType is returned in the response otherwise NULL is returned.

    Boolean

    Optional

    Request Example

    An example GET request for retrieving all profiles marked as favorites for the logged-in user is shown here:

    curl --location --request GET '{{url}}/api/access/favorites/accessTypeRequired=true' \
    --header 'Authorization: TOKEN weWJUHTaim+dgnXmiE0/0L2KyOLQAH6B8c/F2DBGBJE='

    Response Example 

    An example response of the GET request for retrieving all profiles marked as favorites for the logged-in use is shown here:

    Status: 200 OK
    [
        {
            "favoriteId": "ie9fofftduvthzxpwd2r",
            "userId": "947LkZn6Hu9rf02JmwLg",
            "papId": "u837wrygsk0ix4bvf0n4",
            "appContainerId": "3uwecl7t6uzbf0l03t1z",
            "environmentId": "546836430071",
            "accessType" : "PROGRAMMATIC",
            "myAccessDetails": {
                "checkOutTime": "2021-03-31T04:40:12Z",
                "checkInTime": "2021-04-01T06:03:07Z"
            }
        }
    ]



    Was this article helpful?