import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.roles.delete(role_id=458987, reason="<value>")
# Handle response
print(res){
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Delete a role. Optionally, reassign existing users with that role to a new role.
import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.roles.delete(role_id=458987, reason="<value>")
# Handle response
print(res){
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}The ID of the role to delete
The reason for deleting the role
Users with the deleted role will be reassigned to the new role, if a new role ID is provided
Successful Response