Profile Management
    • PDF

    Profile Management

    • PDF

    Article summary

    Resource Profiles

    1. Create a Profile

    This POST method is used to create a resource profile with basic details.

    POST{{url}}/api/resource-manager/profiles

    Request Example

    curl --location --request POST '{{url}}/api/resource-manager/profiles' \
    --header 'Authorization: TOKEN {{token}}' \
    --data-raw '{
      "profileId": "string",
      "name": "string",
      "description": "string",
      "expirationDuration": 0,
      "status": "inactive"
    }'

    Response Example 

    Status: 201 Created
    {
      "profileId": "string",
      "name": "string",
      "description": "string",
      "expirationDuration": 0,
      "status": "inactive"
    }

    2. Get All Resource Profiles

    This GET method is used to get all resource profiles.

    GET{{url}}/api/resource-manager/profiles

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    filterFilter profiles by key. For example, filter=key eq profile1StringOptional
    searchTextFilter profiles by searching text.StringOptional
    pageSpecifies the page number of the permission records to retrieve. The default value is 0.IntegerOptional
    sizeSpecifies the number of profile records to retrieve per page. The default size is 20.IntegerOptional
    sortparameter to specify the sort parameter and directionStringOptional

    Request Example

    curl --location -g --request GET '{{url}}/api/resource-manager/profiles?view=summary&page=0&size=20&sort=name,asc' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    Status: 200 OK
    {
      "count": 0,
      "page": 0,
      "size": 0,
      "sort": "string",
      "data": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "associations": {
            "additionalProp1": [
              "string"
            ],
            "additionalProp2": [
              "string"
            ],
            "additionalProp3": [
              "string"
            ]
          },
          "status": "string",
          "expiration": "string",
          "lastAccessed": "string",
          "lastModifiedBy": "string"
        }
      ]
    }

    3. Get the Resource Profile Details by ID

    This GET method is used to get resource profiles specified by ID.

    GET{{url}}/api/resource-manager/profiles/{id}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idProfile ID.StringMandatory

    Request Example

    curl --location -g --request GET '{{url}}/api/resource-manager/profiles/{id}' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    Status: 200 OK
    {
      "profileId": "string",
      "name": "string",
      "description": "string",
      "expirationDuration": 0,
      "status": "inactive"
    }

    4. Update Profiles

    The PATCH method allows you to edit the resource profile.

    PATCH{{url}}/api/resource-manager/profiles/{id}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idProfile IDStringMandatory

    Request Example

    curl --location --request PATCH '{{url}}/api/resource-manager/profiles/{id}' \
    --header 'Authorization: TOKEN {{token}}' \
    --data-raw '{
      "profileId": "string",
      "name": "string",
      "description": "string",
      "expirationDuration": 0,
      "status": "inactive"
    }'

    Response Example 

    Status: 204 No Content

    5. Clone a Profile

    The POST method allows you to clone a profile.

    POST{{url}}/api/resource-manager/profiles/{{id}}/clone?options={{string}}&ignoreErrors={{boolean}}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    IdProfile ID of the profile to be cloned.string

    Mandatory

    options

    Comma-separated values of clone options.

    string

    Mandatory

    ignoreErrors

    Clone profile except for invalid policies associated with the profile. The default value if false.

    string

    Optional

    Request Example 

    An example request is shown here.

    curl --location --request POST '{{url}}/api/resource-manager/profiles/{{id}}/clone?options={{string}}&ignoreErrors={{boolean}}' \
    --header 'Authorization: TOKEN {{token}}'
    --data_raw '{
        "name": String,
        "description": String
    }'

    Response Example

    Response CodeResponse body
    200 OK
    {
        "profileId": String,
        "name": String,
        "description": String,
        "expirationDuration": Long,
        "status": String
    }

    207 Multi-status
    {
        "failure": {
            "policy": [
                ....
            ]
        },
        "success": {
            "profileId": String,
            "name": String,
            "description": String,
            "expirationDuration": Long,
            "status": String
        }
    }

    422 Unprocessable entity
    {
        "errorMessage": "Cannot clone profile due to one or more validation errors.",
        "policy": {
            "valid": [
                ......
            ],
            "invalid": [
                ......
            ],
            "count": Integer
        }
    }

    6. Delete Resource Profile

    The DELETE method allows you to delete the resource profile created in the system.

    DELETE{{url}}/api/resource-manager/profiles/{id}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idResource profile ID.StringMandatory

    Request Example

    curl --location --request DELETE '{{url}}/api/resource-manager/profiles/{id}' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    The profile is deleted.

    Status: 204 No Content

    Profile Associations

    1. Add Associations to Resource Profile

    This POST method is used to add associations to a resource profile.

    POST{{url}}/api/resource-manager/profiles/{id}/associations

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idResource profile ID.StringMandatory

    Request Example

    curl --location --request POST '{{url}}/api/resource-manager/profiles/{id}/associations' \
    --header 'Authorization: TOKEN {{token}}'
    --data-raw '{
      "associations": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }

    Response Example 

    Status: 200 OK
    {
      "associations": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }

    2. Get Associations for a Resource Profile

    This GET method is used to retrieve the associations for a resource profile.

    GET{{url}}/api/resource-manager/profiles/{id}/associations

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    idResource profile ID.StringMandatory

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/profiles/{id}/associations?' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    Status: 200 OK
    {
      "associations": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      }
    }

    Profile Permissions

    1. Add Permissions to Resource Profile

    This POST method is used to add permissions to a resource profile.

    POST{{url}}/api/resource-manager/profiles/{profileId}/permissions

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    profileIdResource profile ID.StringMandatory

    Request Example

    curl --location --request POST '{{url}}/api/resource-manager/profiles/{profileId}/permissions' \
    --header 'Authorization: TOKEN {{token}}' \
    --data-raw '{
      "permissionId": "string",
      "version": "string",
      "permissionName": "string",
      "resourceTypeId": "string",
      "resourceTypeName": "string",
      "variables": [
        {
          "name": "string",
          "value": "string",
          "isSystemDefined": false
        }
      ]
    }'

    Response Example 

    Status: 201 Created
    {
      "permissionId": "string",
      "version": "string",
      "permissionName": "string",
      "resourceTypeId": "string",
      "resourceTypeName": "string",
      "variables": [
        {
          "name": "string",
          "value": "string",
          "isSystemDefined": false
        }
      ]
    }

    2. Retrieve Assigned Resource Profile Permissions

    The GET method allows you to retrieve the list of all permissions assigned to a resource profile for the given profile ID.

    GET{{url}}/api/resource-manager/profiles/{profileId}/permissions

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    profileIdProfile IDStringMandatory
    filterFilter permissions by key. For example, filter=key eq permission1StringOptional
    searchTextFilter permissions by searching text.StringOptional
    pageSpecifies the page number of the permission records to retrieveIntegerOptional
    sizeSpecifies the number of permission records to retrieve per pageIntegerOptional
    sortSpecifies the sort parameter and directionStringOptional

    Request Example

    curl --location --request GET /api/resource-manager/profiles/{profileId}/permissions?page=0&size=20&sort=name,asc&filter=name%20co%20Admin' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    Status: 200 OK
    {
      "count": 0,
      "page": 0,
      "size": 0,
      "sort": "string",
      "data": [
        {
          "permissionId": "string",
          "version": "string",
          "permissionName": "string",
          "resourceTypeId": "string",
          "resourceTypeName": "string",
          "variables": [
            {
              "name": "string",
              "value": "string",
              "isSystemDefined": false
            }
          ]
        }
      ]
    }

    3. Retrieve Permissions Available to Resource Profile

    This GET method is used to retrieve permissions available to the resource profile.

    GET{{url}}/api/resource-manager/profiles/{profileId}/available-permissions

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    profileIdProfile IDStringMandatory
    filterFilter permissions by key. For example, filter=key eqpermission1StringOptional
    searchTextFilter permissions by searching text.StringOptional
    pageSpecifies the page number of the permission records to retrieveIntegerOptional
    sizeSpecifies the number of permission records to retrieve per pageIntegerOptional
    sortSpecifies the sort parameter and directionStringOptional

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/profiles/{profileId}/available-permissions?page=0&size=20&sort=name,asc&filter=name%20co%20Admin' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    Status: 200 OK
    "string"

    4. Update Permission Variable Values

    The PATCH method allows you to update permission variable values.

    PATCH{{url}}/api/resource-manager/profiles/{profileId}/permissions/{permissionId}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    profileIdResource profile IDStringMandatory
    permissionIdPermission IDStringMandatory

    Request Example

    curl --location --request PATCH '{{url}}/api/resource-manager/profiles/{profileId}/permissions/{permissionId}' \
    --header 'Authorization: TOKEN {{token}}' \
    --data-raw '{
      "permissionId": "string",
      "version": "string",
      "permissionName": "string",
      "resourceTypeId": "string",
      "resourceTypeName": "string",
      "variables": [
        {
          "name": "string",
          "value": "string",
          "isSystemDefined": false
        }
      ]
    }'

    Response Example 

    Status: 204 No Content

    5. Delete Permissions to a Resource Profile

    The DELETE method allows you to delete profile permissions in the system.

    DELETE{{url}}/api/resource-manager/profiles/{profileId}/permissions/{permissionId}

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    profileIdResource profile IDStringMandatory
    permissionIdPermission ID.StringMandatory

    Request Example

    curl --location --request DELETE '{{url}}/{/api/resource-manager/profiles/{profileId}/permissions/{permissionId}' \
    --header 'Authorization: TOKEN {{token}}' 

    Response Example 

    Status: 204 No Content

    6. Get a List of Available System Defined Values

    This GET method retrieves a list of available system-defined values.

    GET{{url}}/api/resource-manager/profiles/permissions/system-defined-values

    Request Parameters

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

    ParameterDescriptionData TypeRequired
    resourceTypeIdResource Type Id.StringOptional

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/profiles/permissions/system-defined-values' \
    --header 'Authorization: TOKEN {{token}}'

    Response Example 

    Status: 200 OK
    [
      "string"
    ]



    Was this article helpful?