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.get_by_id(role_id=324660)
# Handle response
print(res)
{
"name": "Prompt Engineer",
"description": "Role for users who can fetch and change prompts",
"permissions": [
"prompts_read",
"prompts_write",
"prompts_delete"
],
"id": 1,
"last_updated_comments": "Updated to add delete permission",
"is_system_role": false,
"last_updated": "2023-11-07T05:31:56Z",
"last_updated_by": "user@email.com"
}
Fetch a given 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.get_by_id(role_id=324660)
# Handle response
print(res)
{
"name": "Prompt Engineer",
"description": "Role for users who can fetch and change prompts",
"permissions": [
"prompts_read",
"prompts_write",
"prompts_delete"
],
"id": 1,
"last_updated_comments": "Updated to add delete permission",
"is_system_role": false,
"last_updated": "2023-11-07T05:31:56Z",
"last_updated_by": "user@email.com"
}
Successful Response
Information about a role.