Manage Session Attributes
    • PDF

    Manage Session Attributes

    • PDF

    Article summary

    The following Britive API methods allow you to manage session attributes associated with profiles and perform relevant operations. These APIs are supported for AWS applications only.


    1. Add Session Attributes to Profiles

    This API allows you to add session attributes to profiles.   

    POST{{url}}/api/paps/{{papID}}/session-attributes/

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    attributeSchemaId The id of the identity attribute. This is not required if sessionAttributeType is Static.
    Note: Refer to Manage Identity Attributes to get the ID of the attribute.
    stringMandatory

    mappingName

    The name of the attribute that should be included in the request to AWS, during profile checkout. This name should match the tag name defined in your AWS roles.

    string

    Mandatory

    sessionAttributetype
    For static values, this parameter should be 'Static'; otherwise, it should be 'Identity'.stringMandatory
    attributeValue 
    If the sessionAttributetype value is Static, then the attributeValue should not be empty.

    string


    Optional


    transitive 

    To allow role chaining, set the value to true.

    string

    Optional

    papId 

    The profile ID for which session attribute has to be added.

    string

    Mandatory

    Request Example

    An example POST request for adding session attributes to profiles is shown here.

    Shell
    Shell
    curl --location --request POST '{{url}}/api/paps/{{papID}}/session-attributes/' \
    --header 'Authorization: TOKEN {{token}} \
    --data-raw '{
        "attributeSchemaId": "89zu0rj78d0xqs5j2063",
        "mappingName": "cost-center",
        "transitive": true,
        "sessionAttributeType": "Identity",
        "attributeValue": "IT"
    }'

    Response Example 

    An example response of the POST request for adding session attributes to profiles is shown here.

    Status: 200 OK
    JSON
    JSON
    {
        "id": "kom1vbuz1uq9rj7ruryw",
        "attributeSchemaId": "89zu0rj78d0xqs5j2063",
        "mappingName": "cost-center",
        "transitive": true,
        "sessionAttributeType": "Identity",
        "attributeValue": "IT"
    }

    2. Update Session Attributes of Profiles

    This API allows you to update existing session attributes for profiles.   

    PUT{{url}}/api/paps/{{papID}}/session-attributes/

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    attributeSchemaId The ID of the identity attribute. This is not required if sessionAttributeType is Static.
    Note: Refer to Manage Identity Attributes to get the ID of the attribute.
    stringMandatory

    mappingName

    The name of the attribute that should be included in the request to AWS, during profile checkout. This name should match the tag name defined in your AWS roles.

    string

    Mandatory

    sessionAttributetype
    For static values, this parameter should be 'Static'; otherwise, it should be 'Identity'.

    string

    Mandatory
    attributeValue 
    If the sessionAttributetype value is Static, then the attributeValue should not be empty.

    string

    Optional

    transitive 

    To allow role chaining, set the value to true.

    string

    Optional

    papId 

    The profile ID for which session attribute has to be updated.

    string

    Mandatory

    Id
    The ID of the session attribute to be updated.

    string

    Mandatory

    Request Example

    An example PUT request for adding session attributes to profiles is shown here.

    Shell
    Shell
    curl --location --request PUT '{{url}}/api/paps/{{papID}}/session-attributes/' \
    --header 'Authorization: TOKEN {{token}}\
    --data-raw '{
        "id": "kom1vbuz1uq9rj7ruryw",
        "attributeSchemaId": "89zu0rj78d0xqs5j2063",
        "mappingName": "cost-center",
        "transitive": true,
        "sessionAttributeType": "Identity",
        "attributeValue": "IT"
    }'

    Response Example 

    This request does not return any response body.


    3. Retrieve Session Attributes of Profiles

    This API allows you to get all the session attributes for a profile.  

    GET{{url}}/api/paps/{{papID}}/session-attributes

    Request Parameters

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

    ParameterDescriptionData TypeRequired

    papId 

    The profile ID for which session attribute has to be updated.

    string

    Mandatory

    Request Example

    An example GET request for adding session attributes to profiles is shown here.

    Shell
    Shell
    curl --location --request GET '{{url}}/api/paps/{{papID}}/session-attributes' \
    --header 'Authorization: TOKEN {{token}}'
    

    Response Example 

    An example response of the GET request for retrieving session attributes to profiles is shown here.

    Status: 200 OK

    JSON
    JSON
    [
        {
            "id": "kom1vbuz1uq9rj7ruryw",
            "attributeSchemaId": "",
            "mappingName": "cost-center",
            "transitive": true,
            "sessionAttributeType": "Static",
            "attributeValue": "IT"
        },
        {
            "id": "asdfk234lkjasfdj",
            "attributeSchemaId": "werqlmwqer324lqwjs",
            "mappingName": "department",
            "transitive": true,
            "sessionAttributeType": "Identity",
            "attributeValue": null
        }
    ]

    4. Delete Session Attributes of Profiles

    This API allows you to delete the session attributes for a profile.  

    DELETE{{url}}/api/paps/{{papID}}/session-attributes/{{id}}

    Request Parameters

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

    ParameterDescriptionData TypeRequired

    papId 

    The profile ID for which session attribute has to be updated.

    string

    Mandatory

    Id
    The ID of the session attribute to be updated.

    string

    Mandatory

    Request Example

    An example DELETE request for deleting session attributes of profiles is shown here.

    Shell
    Shell
    curl --location --request DELETE '{{url}}/api/paps/{{papID}}/session-attributes/{id}`\ 
    --header 'Authorization: TOKEN {{token}}'
    

    Response Example 

    This request does not return any response body.







    Was this article helpful?