Skip to main content

sailpoint.v2024.RolesApi

Use this API to implement and customize role functionality. With this functionality in place, administrators can create roles and configure them for use throughout Identity Security Cloud. Identity Security Cloud can use established criteria to automatically assign the roles to qualified users. This enables users to get all the access they need quickly and securely and administrators to spend their time on other tasks.

Entitlements represent the most granular level of access in Identity Security Cloud. Access profiles represent the next level and often group entitlements. Roles represent the broadest level of access and often group access profiles.

For example, an Active Directory source in Identity Security Cloud can have multiple entitlements: the first, 'Employees,' may represent the access all employees have at the organization, and a second, 'Developers,' may represent the access all developers have at the organization.

An administrator can then create a broader set of access in the form of an access profile, 'AD Developers' grouping the 'Employees' entitlement with the 'Developers' entitlement.

An administrator can then create an even broader set of access in the form of a role grouping the 'AD Developers' access profile with another profile, 'GitHub Developers,' grouping entitlements for the GitHub source.

When users only need Active Directory employee access, they can request access to the 'Employees' entitlement.

When users need both Active Directory employee and developer access, they can request access to the 'AD Developers' access profile.

When users need both the 'AD Developers' access profile and the 'GitHub Developers' access profile, they can request access to the role grouping both.

Roles often represent positions within organizations. For example, an organization's accountant can access all the tools the organization's accountants need with the 'Accountant' role. If the accountant switches to engineering, a qualified member of the organization can quickly revoke the accountant's 'Accountant' access and grant access to the 'Engineer' role instead, granting access to all the tools the organization's engineers need.

In Identity Security Cloud, adminstrators can use the Access drop-down menu and select Roles to view, configure, and delete existing roles, as well as create new ones. Administrators can enable and disable the role, and they can also make the following configurations:

  • Manage Access: Manage the role's access by adding or removing access profiles.

  • Define Assignment: Define the criteria Identity Security Cloud uses to assign the role to identities. Use the first option, 'Standard Criteria,' to provide specific criteria for assignment like specific account attributes, entitlements, or identity attributes. Use the second, 'Identity List,' to specify the identities for assignment.

  • Access Requests: Configure roles to be requestable and establish an approval process for any requests that the role be granted or revoked. Do not configure a role to be requestable without establishing a secure access request approval process for that role first.

Refer to Working with Roles for more information about roles.

All URIs are relative to https://sailpoint.api.identitynow.com/v2024

MethodHTTP requestDescription
create-rolePOST /rolesCreate a Role
delete-bulk-rolesPOST /roles/bulk-deleteDelete Role(s)
delete-metadata-from-role-by-key-and-valueDELETE /roles/{id}/access-model-metadata/{attributeKey}/values/{attributeValue}Remove a Metadata From Role.
delete-roleDELETE /roles/{id}Delete a Role
get-bulk-update-statusGET /roles/access-model-metadata/bulk-updateGet Bulk-Update Statuses
get-bulk-update-status-by-idGET /roles/access-model-metadata/bulk-update/idGet Bulk-Update Status by ID
get-roleGET /roles/{id}Get a Role
get-role-assigned-identitiesGET /roles/{id}/assigned-identitiesList Identities assigned a Role
get-role-entitlementsGET /roles/{id}/entitlementsList Role's Entitlements
list-rolesGET /rolesList Roles
patch-rolePATCH /roles/{id}Patch a specified Role
search-roles-by-filterPOST /roles/filterFilter Roles by Metadata
update-attribute-key-and-value-to-rolePOST /roles/{id}/access-model-metadata/{attributeKey}/values/{attributeValue}Add a Metadata to Role.
update-roles-metadata-by-filterPOST /roles/access-model-metadata/bulk-update/filterBulk-Update Roles' Metadata by Filters
update-roles-metadata-by-idsPOST /roles/access-model-metadata/bulk-update/idsBulk-Update Roles' Metadata by ID
update-roles-metadata-by-queryPOST /roles/access-model-metadata/bulk-update/queryBulk-Update Roles' Metadata by Query

create-role

Create a Role This API creates a role.

You must have a token with API, ORG_ADMIN, ROLE_ADMIN, or ROLE_SUBADMIN authority to call this API.

In addition, a ROLE_SUBADMIN may not create a role including an access profile if that access profile is associated with a source the ROLE_SUBADMIN is not associated with themselves.

The maximum supported length for the description field is 2000 characters. Longer descriptions will be preserved for existing roles. However, any new roles as well as any updates to existing descriptions will be limited to 2000 characters.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
BodyroleRoleTrue

Return type

Role

Responses

CodeDescriptionData TypeResponse headers
201Role createdRole-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role import Role
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
role = '''{
"owner" : {
"name" : "support",
"id" : "2c9180a46faadee4016fb4e018c20639",
"type" : "IDENTITY"
},
"entitlements" : [ {
"name" : "CN=entitlement.490efde5,OU=OrgCo,OU=ServiceDept,DC=HQAD,DC=local",
"id" : "2c91809773dee32014e13e122092014e",
"type" : "ENTITLEMENT"
}, {
"name" : "CN=entitlement.490efde5,OU=OrgCo,OU=ServiceDept,DC=HQAD,DC=local",
"id" : "2c91809773dee32014e13e122092014e",
"type" : "ENTITLEMENT"
} ],
"dimensional" : false,
"created" : "2021-03-01T22:32:58.104Z",
"dimensionRefs" : [ {
"name" : "Role 2",
"id" : "2c91808568c529c60168cca6f90c1313",
"type" : "DIMENSION"
}, {
"name" : "Role 2",
"id" : "2c91808568c529c60168cca6f90c1313",
"type" : "DIMENSION"
} ],
"description" : "Urna amet cursus pellentesque nisl orci maximus lorem nisl euismod fusce morbi placerat adipiscing maecenas nisi tristique et metus et lacus sed morbi nunc nisl maximus magna arcu varius sollicitudin elementum enim maecenas nisi id ipsum tempus fusce diam ipsum tortor.",
"membership" : {
"identities" : [ {
"aliasName" : "t.edison",
"name" : "Thomas Edison",
"id" : "2c9180a46faadee4016fb4e018c20639",
"type" : "IDENTITY"
}, {
"aliasName" : "t.edison",
"name" : "Thomas Edison",
"id" : "2c9180a46faadee4016fb4e018c20639",
"type" : "IDENTITY"
} ],
"criteria" : {
"stringValue" : "[email protected]",
"children" : [ {
"stringValue" : "[email protected]",
"children" : [ {
"stringValue" : "[email protected]",
"operation" : "EQUALS",
"key" : {
"sourceId" : "2c9180867427f3a301745aec18211519",
"property" : "attribute.email",
"type" : "ACCOUNT"
}
}, {
"stringValue" : "[email protected]",
"operation" : "EQUALS",
"key" : {
"sourceId" : "2c9180867427f3a301745aec18211519",
"property" : "attribute.email",
"type" : "ACCOUNT"
}
} ],
"operation" : "EQUALS",
"key" : {
"sourceId" : "2c9180867427f3a301745aec18211519",
"property" : "attribute.email",
"type" : "ACCOUNT"
}
}, {
"stringValue" : "[email protected]",
"children" : [ {
"stringValue" : "[email protected]",
"operation" : "EQUALS",
"key" : {
"sourceId" : "2c9180867427f3a301745aec18211519",
"property" : "attribute.email",
"type" : "ACCOUNT"
}
}, {
"stringValue" : "[email protected]",
"operation" : "EQUALS",
"key" : {
"sourceId" : "2c9180867427f3a301745aec18211519",
"property" : "attribute.email",
"type" : "ACCOUNT"
}
} ],
"operation" : "EQUALS",
"key" : {
"sourceId" : "2c9180867427f3a301745aec18211519",
"property" : "attribute.email",
"type" : "ACCOUNT"
}
} ],
"operation" : "EQUALS",
"key" : {
"sourceId" : "2c9180867427f3a301745aec18211519",
"property" : "attribute.email",
"type" : "ACCOUNT"
}
},
"type" : "IDENTITY_LIST"
},
"enabled" : true,
"revocationRequestConfig" : {
"commentsRequired" : false,
"approvalSchemes" : [ {
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
"approverType" : "GOVERNANCE_GROUP"
}, {
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
"approverType" : "GOVERNANCE_GROUP"
} ],
"denialCommentsRequired" : false
},
"segments" : [ "f7b1b8a3-5fed-4fd4-ad29-82014e137e19", "29cb6c06-1da8-43ea-8be4-b3125f248f2a" ],
"legacyMembershipInfo" : {
"type" : "IDENTITY_LIST"
},
"accessRequestConfig" : {
"commentsRequired" : true,
"approvalSchemes" : [ {
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
"approverType" : "GOVERNANCE_GROUP"
}, {
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
"approverType" : "GOVERNANCE_GROUP"
} ],
"denialCommentsRequired" : true
},
"accessProfiles" : [ {
"name" : "Access Profile 2567",
"id" : "ff808081751e6e129f1518161919ecca",
"type" : "ACCESS_PROFILE"
}, {
"name" : "Access Profile 2567",
"id" : "ff808081751e6e129f1518161919ecca",
"type" : "ACCESS_PROFILE"
} ],
"name" : "Role 2567",
"modified" : "2021-03-02T20:22:28.104Z",
"accessModelMetadata" : {
"attributes" : [ {
"key" : "iscPrivacy",
"name" : "Privacy",
"multiselect" : false,
"status" : "active",
"type" : "governance",
"objectTypes" : [ "all" ],
"description" : "Specifies the level of privacy associated with an access item.",
"values" : [ {
"value" : "public",
"name" : "Public",
"status" : "active"
} ]
} ]
},
"id" : "2c918086749d78830174a1a40e121518",
"requestable" : true
}''' # Role |

try:
# Create a Role
new_role = Role.from_json(role)
results = RolesApi(api_client).create_role(role=new_role)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).create_role(new_role)
print("The response of RolesApi->create_role:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->create_role: %s\n" % e)

[Back to top]

delete-bulk-roles

Delete Role(s) This endpoint initiates a bulk deletion of one or more roles. When the request is successful, the endpoint returns the bulk delete's task result ID. To follow the task, you can use Get Task Status by ID, which will return the task result's status and information. This endpoint can only bulk delete up to a limit of 50 roles per request. A user with ROLE_SUBADMIN authority can only call this endpoint if all roles included in the request are associated with sources with management workgroups the ROLE_SUBADMIN is a member of.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Bodyrole_bulk_delete_requestRoleBulkDeleteRequestTrue

Return type

TaskResultDto

Responses

CodeDescriptionData TypeResponse headers
202Returns an object with the id of the task performing the delete operation.TaskResultDto-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role_bulk_delete_request import RoleBulkDeleteRequest
from sailpoint.v2024.models.task_result_dto import TaskResultDto
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
role_bulk_delete_request = '''{
"roleIds" : [ "2c9180847812e0b1017817051919ecca", "2c9180887812e0b201781e129f151816" ]
}''' # RoleBulkDeleteRequest |

try:
# Delete Role(s)
new_role_bulk_delete_request = RoleBulkDeleteRequest.from_json(role_bulk_delete_request)
results = RolesApi(api_client).delete_bulk_roles(role_bulk_delete_request=new_role_bulk_delete_request)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).delete_bulk_roles(new_role_bulk_delete_request)
print("The response of RolesApi->delete_bulk_roles:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->delete_bulk_roles: %s\n" % e)

[Back to top]

delete-metadata-from-role-by-key-and-value

Remove a Metadata From Role. This API initialize a request to remove a single Access Model Metadata from a role by attribute key and value. A token with ORG_ADMIN, ROLE_ADMIN ROLE_SUBADMIN authority is required to call this API.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueThe role's id.
Pathattribute_keystrTrueTechnical name of the Attribute.
Pathattribute_valuestrTrueTechnical name of the Attribute Value.

Return type

(empty response body)

Responses

CodeDescriptionData TypeResponse headers
202Request accepted-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = '2c91808c74ff913f0175097daa9d59cd' # str | The role's id. # str | The role's id.
attribute_key = 'iscPrivacy' # str | Technical name of the Attribute. # str | Technical name of the Attribute.
attribute_value = 'public' # str | Technical name of the Attribute Value. # str | Technical name of the Attribute Value.

try:
# Remove a Metadata From Role.

RolesApi(api_client).delete_metadata_from_role_by_key_and_value(id=id, attribute_key=attribute_key, attribute_value=attribute_value)
# Below is a request that includes all optional parameters
# RolesApi(api_client).delete_metadata_from_role_by_key_and_value(id, attribute_key, attribute_value)
except Exception as e:
print("Exception when calling RolesApi->delete_metadata_from_role_by_key_and_value: %s\n" % e)

[Back to top]

delete-role

Delete a Role This API deletes a Role by its ID.

A token with API, ORG_ADMIN, ROLE_ADMIN, or ROLE_SUBADMIN authority is required to call this API. In addition, a token with ROLE_SUBADMIN authority may only call this API if all Access Profiles included in the Role are associated to Sources with management workgroups of which the ROLE_SUBADMIN is a member.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueID of the Role

Return type

(empty response body)

Responses

CodeDescriptionData TypeResponse headers
204No content - indicates the request was successful but there is no content to be returned in the response.-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = '2c91808a7813090a017814121e121518' # str | ID of the Role # str | ID of the Role

try:
# Delete a Role

RolesApi(api_client).delete_role(id=id)
# Below is a request that includes all optional parameters
# RolesApi(api_client).delete_role(id)
except Exception as e:
print("Exception when calling RolesApi->delete_role: %s\n" % e)

[Back to top]

get-bulk-update-status

Get Bulk-Update Statuses This API returns a list of all unfinished bulk update process status of the tenant.

API Spec

Parameters

This endpoint does not need any parameter.

Return type

List[RoleGetAllBulkUpdateResponse]

Responses

CodeDescriptionData TypeResponse headers
200successfully get the status of all unfinished bulk updates request.List[RoleGetAllBulkUpdateResponse]-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role_get_all_bulk_update_response import RoleGetAllBulkUpdateResponse
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:

try:
# Get Bulk-Update Statuses

results = RolesApi(api_client).get_bulk_update_status()
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).get_bulk_update_status()
print("The response of RolesApi->get_bulk_update_status:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->get_bulk_update_status: %s\n" % e)

[Back to top]

get-bulk-update-status-by-id

Get Bulk-Update Status by ID

This API initial a request for one bulk update's status by bulk update Id returns the status of the bulk update process. A token with ORG_ADMIN, ROLE_ADMIN ROLE_SUBADMIN authority is required to call this API.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueThe Id of the bulk update task.

Return type

RoleBulkUpdateResponse

Responses

CodeDescriptionData TypeResponse headers
202return if bulk update status could be found.RoleBulkUpdateResponse-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role_bulk_update_response import RoleBulkUpdateResponse
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = 'c24359c389374d0fb8585698a2189e3d' # str | The Id of the bulk update task. # str | The Id of the bulk update task.

try:
# Get Bulk-Update Status by ID

results = RolesApi(api_client).get_bulk_update_status_by_id(id=id)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).get_bulk_update_status_by_id(id)
print("The response of RolesApi->get_bulk_update_status_by_id:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->get_bulk_update_status_by_id: %s\n" % e)

[Back to top]

get-role

Get a Role This API returns a Role by its ID. A token with API, ORG_ADMIN, ROLE_ADMIN, or ROLE_SUBADMIN authority is required to call this API. In addition, a token with ROLE_SUBADMIN authority may only call this API if all Access Profiles included in the Role are associated to Sources with management workgroups of which the ROLE_SUBADMIN is a member.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueID of the Role

Return type

Role

Responses

CodeDescriptionData TypeResponse headers
200List of all RolesRole-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role import Role
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = '2c91808a7813090a017814121e121518' # str | ID of the Role # str | ID of the Role

try:
# Get a Role

results = RolesApi(api_client).get_role(id=id)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).get_role(id)
print("The response of RolesApi->get_role:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->get_role: %s\n" % e)

[Back to top]

get-role-assigned-identities

List Identities assigned a Role

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueID of the Role for which the assigned Identities are to be listed
Querylimitint(optional) (default to 250)Max number of results to return. See V3 API Standard Collection Parameters for more information.
Queryoffsetint(optional) (default to 0)Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.
Querycountbool(optional) (default to False)If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information.
Queryfiltersstr(optional)Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: id: eq, in aliasName: eq, sw email: eq, sw name: eq, sw, co
Querysortersstr(optional)Sort results using the standard syntax described in V3 API Standard Collection Parameters Sorting is supported for the following fields: id, name, aliasName, email

Return type

List[RoleIdentity]

Responses

CodeDescriptionData TypeResponse headers
200List of Identities assigned the RoleList[RoleIdentity]-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role_identity import RoleIdentity
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = '2c91808a7813090a017814121e121518' # str | ID of the Role for which the assigned Identities are to be listed # str | ID of the Role for which the assigned Identities are to be listed
limit = 250 # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
count = False # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False)
filters = 'name sw Joe' # str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **aliasName**: *eq, sw* **email**: *eq, sw* **name**: *eq, sw, co* (optional) # str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **aliasName**: *eq, sw* **email**: *eq, sw* **name**: *eq, sw, co* (optional)
sorters = 'aliasName,name' # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, aliasName, email** (optional) # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, aliasName, email** (optional)

try:
# List Identities assigned a Role

results = RolesApi(api_client).get_role_assigned_identities(id=id)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).get_role_assigned_identities(id, limit, offset, count, filters, sorters)
print("The response of RolesApi->get_role_assigned_identities:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->get_role_assigned_identities: %s\n" % e)

[Back to top]

get-role-entitlements

experimental

This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.

setting x-sailpoint-experimental header

on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK. Example:

  configuration = Configuration()
configuration.experimental = True

List Role's Entitlements Get a list of entitlements associated with a specified role.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueContaining role's ID.
x_sail_point_experimentalstrTrue (default to 'true')Use this header to enable this experimental API.
Querylimitint(optional) (default to 50)Note that for this API the maximum value for limit is 50. See V3 API Standard Collection Parameters for more information.
Queryoffsetint(optional) (default to 0)Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.
Querycountbool(optional) (default to False)If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information.
Queryfiltersstr(optional)Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: id: eq, in name: eq, sw attribute: eq, sw value: eq, sw created: gt, lt, ge, le modified: gt, lt, ge, le owner.id: eq, in source.id: eq, in
Querysortersstr(optional)Sort results using the standard syntax described in V3 API Standard Collection Parameters Sorting is supported for the following fields: name, attribute, value, created, modified

Return type

List[Entitlement]

Responses

CodeDescriptionData TypeResponse headers
200List of EntitlementsList[Entitlement]-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.entitlement import Entitlement
from sailpoint.configuration import Configuration
configuration = Configuration()

configuration.experimental = true

with ApiClient(configuration) as api_client:
id = '2c91808a7813090a017814121919ecca' # str | Containing role's ID. # str | Containing role's ID.
x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (default to 'true') # str | Use this header to enable this experimental API. (default to 'true')
limit = 50 # int | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50) # int | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50)
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
count = False # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False)
filters = 'attribute eq \"memberOf\"' # str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **attribute**: *eq, sw* **value**: *eq, sw* **created**: *gt, lt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **source.id**: *eq, in* (optional) # str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **attribute**: *eq, sw* **value**: *eq, sw* **created**: *gt, lt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **source.id**: *eq, in* (optional)
sorters = 'name,-modified' # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, attribute, value, created, modified** (optional) # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, attribute, value, created, modified** (optional)

try:
# List Role's Entitlements

results = RolesApi(api_client).get_role_entitlements(id=id, x_sail_point_experimental=x_sail_point_experimental)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).get_role_entitlements(id, x_sail_point_experimental, limit, offset, count, filters, sorters)
print("The response of RolesApi->get_role_entitlements:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->get_role_entitlements: %s\n" % e)

[Back to top]

list-roles

List Roles This API returns a list of Roles.

A token with API, ORG_ADMIN, ROLE_ADMIN, or ROLE_SUBADMIN authority is required to call this API.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Queryfor_subadminstr(optional)If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value me, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the for-subadmin parameter is specified for an Identity that is not a subadmin.
Querylimitint(optional) (default to 50)Note that for this API the maximum value for limit is 50. See V3 API Standard Collection Parameters for more information.
Queryoffsetint(optional) (default to 0)Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.
Querycountbool(optional) (default to False)If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information.
Queryfiltersstr(optional)Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: id: eq, in name: eq, sw created: gt, lt, ge, le modified: gt, lt, ge, le owner.id: eq, in requestable: eq
Querysortersstr(optional)Sort results using the standard syntax described in V3 API Standard Collection Parameters Sorting is supported for the following fields: name, created, modified
Queryfor_segment_idsstr(optional)If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error.
Queryinclude_unsegmentedbool(optional) (default to True)Whether or not the response list should contain unsegmented Roles. If for-segment-ids is absent or empty, specifying include-unsegmented as false results in an error.

Return type

List[Role]

Responses

CodeDescriptionData TypeResponse headers
200List of RolesList[Role]-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role import Role
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
for_subadmin = '5168015d32f890ca15812c9180835d2e' # str | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional) # str | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional)
limit = 50 # int | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50) # int | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50)
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
count = False # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False)
filters = 'requestable eq false' # str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **created**: *gt, lt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **requestable**: *eq* (optional) # str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **created**: *gt, lt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **requestable**: *eq* (optional)
sorters = 'name,-modified' # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional) # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional)
for_segment_ids = '0b5c9f25-83c6-4762-9073-e38f7bb2ae26,2e8d8180-24bc-4d21-91c6-7affdb473b0d' # str | If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional) # str | If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional)
include_unsegmented = True # bool | Whether or not the response list should contain unsegmented Roles. If *for-segment-ids* is absent or empty, specifying *include-unsegmented* as false results in an error. (optional) (default to True) # bool | Whether or not the response list should contain unsegmented Roles. If *for-segment-ids* is absent or empty, specifying *include-unsegmented* as false results in an error. (optional) (default to True)

try:
# List Roles

results = RolesApi(api_client).list_roles()
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).list_roles(for_subadmin, limit, offset, count, filters, sorters, for_segment_ids, include_unsegmented)
print("The response of RolesApi->list_roles:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->list_roles: %s\n" % e)

[Back to top]

patch-role

Patch a specified Role This API updates an existing role using JSON Patch syntax.

The following fields are patchable:

  • name
  • description
  • enabled
  • owner
  • accessProfiles
  • entitlements
  • membership
  • requestable
  • accessRequestConfig
  • revokeRequestConfig
  • segments
  • accessModelMetadata
    A token with API, ORG_ADMIN, ROLE_ADMIN, or ROLE_SUBADMIN authority is required to call this API. In addition, a token with ROLE_SUBADMIN authority may only call this API if all access profiles included in the role are associated to Sources with management workgroups of which the ROLE_SUBADMIN is a member.

The maximum supported length for the description field is 2000 characters. Longer descriptions will be preserved for existing roles, however, any new roles as well as any updates to existing descriptions will be limited to 2000 characters.

When you use this API to modify a role's membership identities, you can only modify up to a limit of 500 membership identities at a time.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueID of the Role to patch
Bodyjson_patch_operation[]JsonPatchOperationTrue

Return type

Role

Responses

CodeDescriptionData TypeResponse headers
200Responds with the Role as updated.Role-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json-patch+json
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.json_patch_operation import JsonPatchOperation
from sailpoint.v2024.models.role import Role
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = '2c91808a7813090a017814121e121518' # str | ID of the Role to patch # str | ID of the Role to patch
json_patch_operation = '''[{op=replace, path=/requestable, value=true}, {op=replace, path=/enabled, value=true}]''' # List[JsonPatchOperation] |

try:
# Patch a specified Role
new_json_patch_operation = JsonPatchOperation.from_json(json_patch_operation)
results = RolesApi(api_client).patch_role(id=id, json_patch_operation=new_json_patch_operation)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).patch_role(id, new_json_patch_operation)
print("The response of RolesApi->patch_role:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->patch_role: %s\n" % e)

[Back to top]

search-roles-by-filter

Filter Roles by Metadata This API returns a list of Role that filter by metadata and filter, it support filter by both path parameter and attribute key and values. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, HELPDESK, CERT_ADMIN, REPORT_ADMIN or SOURCE_ADMIN authority is required to call this API.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Queryfor_subadminstr(optional)If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value me, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the for-subadmin parameter is specified for an Identity that is not a subadmin.
Querylimitint(optional) (default to 50)Max number of results to return See V3 API Standard Collection Parameters for more information.
Queryoffsetint(optional) (default to 0)Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.
Querycountbool(optional) (default to False)If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information.
Querysortersstr(optional)Sort results using the standard syntax described in V3 API Standard Collection Parameters Sorting is supported for the following fields: name, created, modified
Queryfor_segment_idsstr(optional)If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error.
Queryinclude_unsegmentedbool(optional) (default to True)Whether or not the response list should contain unsegmented Roles. If for-segment-ids is absent or empty, specifying include-unsegmented as false results in an error.
Bodyrole_list_filter_dtoRoleListFilterDTO(optional)

Return type

Role

Responses

CodeDescriptionData TypeResponse headers
200Responds with A list of RolesRole[str]-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role import Role
from sailpoint.v2024.models.role_list_filter_dto import RoleListFilterDTO
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
for_subadmin = '5168015d32f890ca15812c9180835d2e' # str | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional) # str | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional)
limit = 50 # int | Max number of results to return See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50) # int | Max number of results to return See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50)
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
count = False # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False)
sorters = 'name,-modified' # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional) # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional)
for_segment_ids = '0b5c9f25-83c6-4762-9073-e38f7bb2ae26,2e8d8180-24bc-4d21-91c6-7affdb473b0d' # str | If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional) # str | If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional)
include_unsegmented = True # bool | Whether or not the response list should contain unsegmented Roles. If *for-segment-ids* is absent or empty, specifying *include-unsegmented* as false results in an error. (optional) (default to True) # bool | Whether or not the response list should contain unsegmented Roles. If *for-segment-ids* is absent or empty, specifying *include-unsegmented* as false results in an error. (optional) (default to True)
role_list_filter_dto = '''{
"ammKeyValues" : [ {
"attribute" : "iscFederalClassifications",
"values" : [ "secret" ]
} ],
"filters" : "dimensional eq false"
}''' # RoleListFilterDTO | (optional)

try:
# Filter Roles by Metadata

results = RolesApi(api_client).search_roles_by_filter()
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).search_roles_by_filter(for_subadmin, limit, offset, count, sorters, for_segment_ids, include_unsegmented, new_role_list_filter_dto)
print("The response of RolesApi->search_roles_by_filter:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->search_roles_by_filter: %s\n" % e)

[Back to top]

update-attribute-key-and-value-to-role

Add a Metadata to Role. This API initialize a request to add a single Access Model Metadata to a role by attribute key and attribute value. A token with ORG_ADMIN, ROLE_ADMIN ROLE_SUBADMIN authority is required to call this API. The maximum number of attributes in one role is 25. Custom metadata update, including ADD and REPLACE need suit licensed.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueThe Id of a role
Pathattribute_keystrTrueTechnical name of the Attribute.
Pathattribute_valuestrTrueTechnical name of the Attribute Value.

Return type

Role

Responses

CodeDescriptionData TypeResponse headers
200Responds with the Role as updated.Role-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role import Role
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = 'c24359c389374d0fb8585698a2189e3d' # str | The Id of a role # str | The Id of a role
attribute_key = 'iscPrivacy' # str | Technical name of the Attribute. # str | Technical name of the Attribute.
attribute_value = 'public' # str | Technical name of the Attribute Value. # str | Technical name of the Attribute Value.

try:
# Add a Metadata to Role.

results = RolesApi(api_client).update_attribute_key_and_value_to_role(id=id, attribute_key=attribute_key, attribute_value=attribute_value)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).update_attribute_key_and_value_to_role(id, attribute_key, attribute_value)
print("The response of RolesApi->update_attribute_key_and_value_to_role:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->update_attribute_key_and_value_to_role: %s\n" % e)

[Back to top]

update-roles-metadata-by-filter

Bulk-Update Roles' Metadata by Filters This API initiates a bulk update of metadata for one or more Roles by filter. A token with ORG_ADMIN, ROLE_ADMIN ROLE_SUBADMIN authority is required to call this API. The maximum metadata value count for a single role is 25. Custom metadata update, including add, replace need suit licensed.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Bodyrole_metadata_bulk_update_by_filter_requestRoleMetadataBulkUpdateByFilterRequestTrue

Return type

RoleBulkUpdateResponse

Responses

CodeDescriptionData TypeResponse headers
202Returned if bulk update request createdRoleBulkUpdateResponse-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role_bulk_update_response import RoleBulkUpdateResponse
from sailpoint.v2024.models.role_metadata_bulk_update_by_filter_request import RoleMetadataBulkUpdateByFilterRequest
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
role_metadata_bulk_update_by_filter_request = '''{
"values" : [ {
"attribute" : "iscFederalClassifications",
"values" : [ "topSecret" ]
} ],
"filters" : " requestable eq false",
"replaceScope" : "ALL",
"operation" : "REPLACE"
}''' # RoleMetadataBulkUpdateByFilterRequest |

try:
# Bulk-Update Roles' Metadata by Filters
new_role_metadata_bulk_update_by_filter_request = RoleMetadataBulkUpdateByFilterRequest.from_json(role_metadata_bulk_update_by_filter_request)
results = RolesApi(api_client).update_roles_metadata_by_filter(role_metadata_bulk_update_by_filter_request=new_role_metadata_bulk_update_by_filter_request)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).update_roles_metadata_by_filter(new_role_metadata_bulk_update_by_filter_request)
print("The response of RolesApi->update_roles_metadata_by_filter:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->update_roles_metadata_by_filter: %s\n" % e)

[Back to top]

update-roles-metadata-by-ids

Bulk-Update Roles' Metadata by ID This API initiates a bulk update of metadata for one or more Roles by a list of Role Ids. A token with ORG_ADMIN, ROLE_ADMIN ROLE_SUBADMIN authority is required to call this API. The maximum role count in a single update request is 3000. The maximum metadata value count for a single role is 25. Custom metadata update, including add, replace need suit licensed.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Bodyrole_metadata_bulk_update_by_id_requestRoleMetadataBulkUpdateByIdRequestTrue

Return type

RoleBulkUpdateResponse

Responses

CodeDescriptionData TypeResponse headers
202Returned if bulk update request createdRoleBulkUpdateResponse-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role_bulk_update_response import RoleBulkUpdateResponse
from sailpoint.v2024.models.role_metadata_bulk_update_by_id_request import RoleMetadataBulkUpdateByIdRequest
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
role_metadata_bulk_update_by_id_request = '''{
"roles" : [ "b1db89554cfa431cb8b9921ea38d9367" ],
"values" : [ {
"attribute" : "iscFederalClassifications",
"values" : [ "topSecret" ]
} ],
"replaceScope" : "ALL",
"operation" : "REPLACE"
}''' # RoleMetadataBulkUpdateByIdRequest |

try:
# Bulk-Update Roles' Metadata by ID
new_role_metadata_bulk_update_by_id_request = RoleMetadataBulkUpdateByIdRequest.from_json(role_metadata_bulk_update_by_id_request)
results = RolesApi(api_client).update_roles_metadata_by_ids(role_metadata_bulk_update_by_id_request=new_role_metadata_bulk_update_by_id_request)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).update_roles_metadata_by_ids(new_role_metadata_bulk_update_by_id_request)
print("The response of RolesApi->update_roles_metadata_by_ids:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->update_roles_metadata_by_ids: %s\n" % e)

[Back to top]

update-roles-metadata-by-query

Bulk-Update Roles' Metadata by Query This API initiates a bulk update of metadata for one or more Roles by query. A token with ORG_ADMIN, ROLE_ADMIN ROLE_SUBADMIN authority is required to call this API. The maximum metadata value count for a single role is 25. Custom metadata update, including add, replace need suit licensed.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Bodyrole_metadata_bulk_update_by_query_requestRoleMetadataBulkUpdateByQueryRequestTrue

Return type

RoleBulkUpdateResponse

Responses

CodeDescriptionData TypeResponse headers
202Returned if bulk update request createdRoleBulkUpdateResponse-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

from sailpoint.v2024.api.roles_api import RolesApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.role_bulk_update_response import RoleBulkUpdateResponse
from sailpoint.v2024.models.role_metadata_bulk_update_by_query_request import RoleMetadataBulkUpdateByQueryRequest
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
role_metadata_bulk_update_by_query_request = '''{
"query" : {
"query\"" : {
"indices" : [ "roles" ],
"queryType" : "TEXT",
"textQuery" : {
"terms" : [ "test123" ],
"fields" : [ "id" ],
"matchAny" : false,
"contains" : true
},
"includeNested" : false
}
},
"values" : [ {
"attributeValue" : [ "topSecret" ],
"attributeKey" : "iscFederalClassifications"
}, {
"attributeValue" : [ "topSecret" ],
"attributeKey" : "iscFederalClassifications"
} ],
"replaceScope" : "ALL",
"operation" : "REPLACE"
}''' # RoleMetadataBulkUpdateByQueryRequest |

try:
# Bulk-Update Roles' Metadata by Query
new_role_metadata_bulk_update_by_query_request = RoleMetadataBulkUpdateByQueryRequest.from_json(role_metadata_bulk_update_by_query_request)
results = RolesApi(api_client).update_roles_metadata_by_query(role_metadata_bulk_update_by_query_request=new_role_metadata_bulk_update_by_query_request)
# Below is a request that includes all optional parameters
# results = RolesApi(api_client).update_roles_metadata_by_query(new_role_metadata_bulk_update_by_query_request)
print("The response of RolesApi->update_roles_metadata_by_query:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling RolesApi->update_roles_metadata_by_query: %s\n" % e)

[Back to top]