- approve_access_request - ApproveAccessRequest
- assign_permission_to_role - AssignPermissionToRole
- assign_role_to_member - Member role assignment
- create_api_key - API Key management
- create_personal_api_key - Create an API key owned by the calling member. Requires no permission.
- create_role - Role management
- create_import_upload - CreateRolePermissionsUploadUrl
- create_service_account - Service account management
- create_service_account_api_key - Create an API key owned by a service account. Requires organization:write.
- delete_role - DeleteRole
- delete_service_account - DeleteServiceAccount
- export_roles - ExportRolePermissions
- generate_share_link - GenerateShareLink
- get_current_member_roles_and_permissions - Get current member roles and permissions
- get_embed_user_api_key - GetEmbedUserApiKey
- get_member_roles - GetMemberRoles
- get_object_access - GetObjectAccess
- get_role - GetRole
- get_role_permissions - GetRolePermissions
- has_object_access - HasObjectAccess
- import_roles - ImportRolePermissions
- list_access_requests - ListAccessRequests
- list_api_keys - ListApiKeys
- list_permissions - Permission management
- list_roles - ListRoles
- list_service_accounts - ListServiceAccounts
- parse_role_import - Parse a CSV or XLSX file into an editable draft without creating roles. Unknown names and values are preserved for correction; import validates them.
- reject_access_request - RejectAccessRequest
- remove_permission_from_role - RemovePermissionFromRole
- remove_role_from_member - RemoveRoleFromMember
- request_access - Access request management
- revoke_api_key - RevokeApiKey
- revoke_object_access - RevokeObjectAccess
- rotate_api_key - RotateApiKey
- set_role_permissions - Bulk add/remove permissions on a role in one call, producing a single audit entry for the whole edit.
- share_object - Object sharing and access control
- share_object_with_role - ShareObjectWithRole
- update_object_access - UpdateObjectAccess
- update_object_visibility - UpdateObjectVisibility
- update_role - UpdateRole
- who_am_i - Describe what a key is allowed to do.
ApproveAccessRequest
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.approve_access_request()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
request_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceApproveAccessRequestResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
AssignPermissionToRole
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.assign_permission_to_role()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
permission |
Optional[models.TextqlRPCPublicRbacPermissionSpec] | ➖ | A single RBAC permission. Select a resource and one of its supported actions. |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceAssignPermissionToRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Member role assignment
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.assign_role_to_member()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
member_email |
Optional[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of member_id; if both are supplied they must identify the same member. |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
member_id |
Optional[str] | ➖ | N/A |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceAssignRoleToMemberResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
API Key management
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.create_api_key()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
target_member_email |
OptionalNullable[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of target_member_id; if both are supplied they must identify the same member. |
assumed_role_names |
List[str] | ➖ | Exact, case-sensitive role names in the caller's organization. Merged with legacy assumed_roles IDs and deduplicated. The existing member-role and calling API-key scope restrictions apply to both forms. |
expiry_seconds |
OptionalNullable[int] | ➖ | N/A |
assumed_roles |
List[str] | ➖ | Role IDs (UUIDs) to scope the new API key to. The service validates that each ID exists in the caller's org. Non-admin callers may only specify roles they already hold; assumed-role API key callers may only specify a subset of their current assumed roles. Legacy role IDs. Prefer assumed_role_names. |
inherit_all_roles |
OptionalNullable[bool] | ➖ | When true, the API key inherits all of the creating member's roles (no assumed-role scoping). Callers must set this explicitly when both role lists are empty; otherwise the request is rejected to prevent accidentally creating over-privileged keys. |
name |
OptionalNullable[str] | ➖ | Optional display name for the API key. |
target_member_id |
OptionalNullable[str] | ➖ | Optional owner override for the new API key. If unset, the API key is created for the calling member. If set, the API key is created for this member ID (target principal): service-account targets require the caller to hold organization:write; human targets require api_access_key:delegate, and the key is bounded by the target member's roles with superadmin elevation always suppressed. |
client_id |
OptionalNullable[str] | ➖ | Optional client metadata stored on the API key as client_id. Prefer a JSON object string when using structured client attributes. |
suppress_superadmin |
Optional[bool] | ➖ | When true, requests authenticated with this key skip the @textql.com-email superadmin elevation branch. Only meaningful when paired with assumed_roles so a textql admin can preview a role's experience without superadmin permissions bleeding through. |
full_member_access |
Optional[bool] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceCreateAPIKeyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Create an API key owned by the calling member. Requires no permission.
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.create_personal_api_key()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
assumed_role_names |
List[str] | ➖ | Exact, case-sensitive role names in the caller's organization. Merged with legacy assumed_roles IDs and deduplicated. The existing member-role and calling API-key scope restrictions apply to both forms. |
name |
OptionalNullable[str] | ➖ | N/A |
expiry_seconds |
OptionalNullable[int] | ➖ | N/A |
assumed_roles |
List[str] | ➖ | Bounded by the roles the caller holds. Legacy role IDs. Prefer assumed_role_names. |
inherit_all_roles |
OptionalNullable[bool] | ➖ | Required when both role lists are empty, so omission cannot mint a wide key. |
client_id |
OptionalNullable[str] | ➖ | N/A |
full_member_access |
Optional[bool] | ➖ | Also reach the owner's own items; otherwise the key sees only what the assumed roles can see. |
suppress_superadmin |
Optional[bool] | ➖ | Drop @textql.com superadmin elevation. No-op for non-superadmins. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceCreatePersonalAPIKeyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Role management
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.create_role()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
name |
Optional[str] | ➖ | N/A |
description |
Optional[str] | ➖ | N/A |
color |
Optional[str] | ➖ | N/A |
icon |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceCreateRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
CreateRolePermissionsUploadUrl
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.create_import_upload()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
file_name |
Optional[str] | ➖ | N/A |
size_bytes |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceCreateRolePermissionsUploadURLResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Service account management
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.create_service_account()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
owner_member_email |
OptionalNullable[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of owner_member_id; if both are supplied they must identify the same member. |
name |
Optional[str] | ➖ | N/A |
description |
OptionalNullable[str] | ➖ | N/A |
owner_member_id |
OptionalNullable[str] | ➖ | N/A |
role_names |
List[str] | ➖ | Exact, case-sensitive role names in the caller's organization. Merged with legacy role_ids and deduplicated; bounded by caller authority. |
role_ids |
List[str] | ➖ | Legacy role IDs. Prefer role_names. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceCreateServiceAccountResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Create an API key owned by a service account. Requires organization:write.
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.create_service_account_api_key()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
service_account_email |
Optional[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of service_account_member_id; if both are supplied they must identify the same member. |
assumed_role_names |
List[str] | ➖ | Exact, case-sensitive role names in the caller's organization. Merged with legacy assumed_roles IDs and deduplicated. The existing member-role and calling API-key scope restrictions apply to both forms. |
service_account_member_id |
Optional[str] | ➖ | N/A |
name |
OptionalNullable[str] | ➖ | N/A |
expiry_seconds |
OptionalNullable[int] | ➖ | N/A |
assumed_roles |
List[str] | ➖ | Bounded by the service account's own roles; org admins get no bypass here. Legacy role IDs. Prefer assumed_role_names. |
inherit_all_roles |
OptionalNullable[bool] | ➖ | Required when both role lists are empty, so omission cannot mint a wide key. |
client_id |
OptionalNullable[str] | ➖ | N/A |
full_member_access |
Optional[bool] | ➖ | Also reach the service account's own items. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceCreateServiceAccountAPIKeyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
DeleteRole
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.delete_role()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceDeleteRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
DeleteServiceAccount
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.delete_service_account()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
member_email |
Optional[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of member_id; if both are supplied they must identify the same member. |
member_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceDeleteServiceAccountResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ExportRolePermissions
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.export_roles()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
format_ |
Optional[models.TextqlRPCPublicRbacRolePermissionsExportFormat] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceExportRolePermissionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GenerateShareLink
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.generate_share_link()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
object_type |
Optional[str] | ➖ | N/A |
object_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceGenerateShareLinkResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Get current member roles and permissions
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.get_current_member_roles_and_permissions(body={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicRbacGetCurrentMemberRolesAndPermissionsRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceGetCurrentMemberRolesAndPermissionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetEmbedUserApiKey
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.get_embed_user_api_key()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
member_email |
Optional[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of member_id; if both are supplied they must identify the same member. |
member_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceGetEmbedUserAPIKeyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetMemberRoles
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.get_member_roles()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
member_emails |
List[str] | ➖ | Emails within the caller's organization; case-insensitive, with outer whitespace ignored. Merged with member_ids and deduplicated. Unknown emails are rejected. |
member_ids |
List[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceGetMemberRolesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetObjectAccess
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.get_object_access()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
object_type |
Optional[str] | ➖ | N/A |
object_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceGetObjectAccessResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetRole
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.get_role()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceGetRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetRolePermissions
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.get_role_permissions()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceGetRolePermissionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
HasObjectAccess
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.has_object_access()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
member_email |
OptionalNullable[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of member_id; if both are supplied they must identify the same member. |
role_name |
OptionalNullable[str] | ➖ | Exact, case-sensitive role name in the caller's organization. To target a role, supply role_name or role_id; if both are supplied they must match. |
object_type |
Optional[str] | ➖ | N/A |
object_id |
Optional[str] | ➖ | N/A |
member_id |
OptionalNullable[str] | ➖ | N/A |
role_id |
OptionalNullable[str] | ➖ | Legacy role ID. Prefer role_name. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceHasObjectAccessResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ImportRolePermissions
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.import_roles()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
data |
Optional[str] | ➖ | Legacy CSV input. Prefer draft to approve an edited parsing response. Supply exactly one of data or draft. All values are validated before creation. |
draft |
Optional[models.TextqlRPCPublicRbacRolePermissionsImportDraft] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceImportRolePermissionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ListAccessRequests
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.list_access_requests()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
object_type |
OptionalNullable[str] | ➖ | N/A |
object_id |
OptionalNullable[str] | ➖ | N/A |
status |
OptionalNullable[str] | ➖ | pending, approved, rejected |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceListAccessRequestsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ListApiKeys
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.list_api_keys()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
service_account_email |
OptionalNullable[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of service_account_member_id; if both are supplied they must identify the same member. |
scope |
Optional[models.TextqlRPCPublicRbacAPIKeyScope] | ➖ | N/A |
service_account_member_id |
OptionalNullable[str] | ➖ | N/A |
include_revoked |
OptionalNullable[bool] | ➖ | N/A |
search_term |
OptionalNullable[str] | ➖ | N/A |
sort_by |
Optional[models.TextqlRPCPublicRbacAPIKeySortField] | ➖ | N/A |
sort_direction |
Optional[models.TextqlRPCPublicCommonSortDirection] | ➖ | Common enum for sort direction used across multiple services |
page_size |
OptionalNullable[int] | ➖ | N/A |
page_token |
OptionalNullable[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceListAPIKeysResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Permission management
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.list_permissions(body={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicRbacListPermissionsRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceListPermissionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ListRoles
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.list_roles(body={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicRbacListRolesRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceListRolesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ListServiceAccounts
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.list_service_accounts()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
search_term |
OptionalNullable[str] | ➖ | N/A |
page_size |
OptionalNullable[int] | ➖ | N/A |
page_token |
OptionalNullable[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceListServiceAccountsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Parse a CSV or XLSX file into an editable draft without creating roles. Unknown names and values are preserved for correction; import validates them.
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.parse_role_import()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
file_url |
Optional[str] | ➖ | Presigned download URL for a CSV or XLSX file, up to 1 MiB and 100 roles. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceParseRolePermissionsImportResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
RejectAccessRequest
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.reject_access_request()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
request_id |
Optional[str] | ➖ | N/A |
rejection_reason |
OptionalNullable[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceRejectAccessRequestResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
RemovePermissionFromRole
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.remove_permission_from_role()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
permission |
Optional[models.TextqlRPCPublicRbacPermissionSpec] | ➖ | A single RBAC permission. Select a resource and one of its supported actions. |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceRemovePermissionFromRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
RemoveRoleFromMember
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.remove_role_from_member()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
member_email |
Optional[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of member_id; if both are supplied they must identify the same member. |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
member_id |
Optional[str] | ➖ | N/A |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceRemoveRoleFromMemberResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Access request management
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.request_access()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
object_type |
Optional[str] | ➖ | N/A |
object_id |
Optional[str] | ➖ | N/A |
requested_access_type |
Optional[str] | ➖ | owner, editor, viewer |
justification |
Optional[str] | ➖ | N/A |
request_message |
OptionalNullable[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceRequestAccessResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
RevokeApiKey
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.revoke_api_key()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
api_key_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceRevokeAPIKeyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
RevokeObjectAccess
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.revoke_object_access()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
member_email |
OptionalNullable[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of member_id; if both are supplied they must identify the same member. |
role_name |
OptionalNullable[str] | ➖ | Exact, case-sensitive role name in the caller's organization. To target a role, supply role_name or role_id; if both are supplied they must match. |
object_type |
Optional[str] | ➖ | N/A |
object_id |
Optional[str] | ➖ | N/A |
member_id |
OptionalNullable[str] | ➖ | N/A |
role_id |
OptionalNullable[str] | ➖ | Legacy role ID. Prefer role_name. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceRevokeObjectAccessResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
RotateApiKey
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.rotate_api_key()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
api_key_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceRotateAPIKeyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Bulk add/remove permissions on a role in one call, producing a single audit entry for the whole edit.
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.set_role_permissions()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. |
add_permissions |
List[models.TextqlRPCPublicRbacPermissionSpec] | ➖ | Permissions to add. Duplicates are ignored; a permission cannot be both added and removed in the same request. |
remove_permissions |
List[models.TextqlRPCPublicRbacPermissionSpec] | ➖ | Permissions to remove. |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceSetRolePermissionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Object sharing and access control
import os
from textql_sdk import Textql
from textql_sdk.utils import parse_datetime
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.share_object(expires_at=parse_datetime("2023-01-15T01:30:15.01Z"))
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A | |
member_email |
Optional[str] | ➖ | Email within the caller's organization; case-insensitive, with outer whitespace ignored. Use instead of member_id; if both are supplied they must identify the same member. |
|
object_type |
Optional[str] | ➖ | N/A | |
object_id |
Optional[str] | ➖ | N/A | |
member_id |
Optional[str] | ➖ | N/A | |
access_type |
Optional[str] | ➖ | owner, editor, viewer | |
expires_at |
date | ➖ | A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a 24-hour linear smear. The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. # Examples Example 1: Compute Timestamp from POSIX time().Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX gettimeofday().struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java System.currentTimeMillis().long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java Instant.now().Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A ProtoJSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a ProtoJSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be convertedto this format using strftime withthe time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [ ISODateTimeFormat.dateTime()](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. |
Example 1: 2023-01-15T01:30:15.01Z Example 2: 2024-12-25T12:00:00Z |
is_public |
Optional[bool] | ➖ | N/A | |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceShareObjectResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ShareObjectWithRole
import os
from textql_sdk import Textql
from textql_sdk.utils import parse_datetime
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.share_object_with_role(expires_at=parse_datetime("2023-01-15T01:30:15.01Z"))
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A | |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name in the caller's organization. Supply role_name or role_id; if both are supplied they must match. |
|
object_type |
Optional[str] | ➖ | N/A | |
object_id |
Optional[str] | ➖ | N/A | |
role_id |
Optional[str] | ➖ | Legacy role ID. Prefer role_name. | |
access_type |
Optional[str] | ➖ | owner, editor, viewer | |
expires_at |
date | ➖ | A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a 24-hour linear smear. The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. # Examples Example 1: Compute Timestamp from POSIX time().Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX gettimeofday().struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java System.currentTimeMillis().long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java Instant.now().Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A ProtoJSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a ProtoJSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be convertedto this format using strftime withthe time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [ ISODateTimeFormat.dateTime()](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. |
Example 1: 2023-01-15T01:30:15.01Z Example 2: 2024-12-25T12:00:00Z |
is_public |
Optional[bool] | ➖ | N/A | |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceShareObjectWithRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
UpdateObjectAccess
import os
from textql_sdk import Textql
from textql_sdk.utils import parse_datetime
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.update_object_access(expires_at=parse_datetime("2023-01-15T01:30:15.01Z"))
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A | |
access_id |
Optional[str] | ➖ | N/A | |
access_type |
Optional[str] | ➖ | owner, editor, viewer | |
expires_at |
date | ➖ | A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a 24-hour linear smear. The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. # Examples Example 1: Compute Timestamp from POSIX time().Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX gettimeofday().struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java System.currentTimeMillis().long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java Instant.now().Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A ProtoJSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a ProtoJSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be convertedto this format using strftime withthe time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [ ISODateTimeFormat.dateTime()](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. |
Example 1: 2023-01-15T01:30:15.01Z Example 2: 2024-12-25T12:00:00Z |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceUpdateObjectAccessResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
UpdateObjectVisibility
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.update_object_visibility()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
object_type |
Optional[str] | ➖ | N/A |
object_id |
Optional[str] | ➖ | N/A |
is_public |
Optional[bool] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceUpdateObjectVisibilityResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
UpdateRole
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.update_role()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
role_name |
Optional[str] | ➖ | Exact, case-sensitive role name, unique within the caller's organization. Supply role_name or role_id. For updates, name is the new name. |
name |
Optional[str] | ➖ | N/A |
description |
Optional[str] | ➖ | N/A |
allowed_models |
List[models.TextqlRPCPublicChatLlmModel] | ➖ | N/A |
default_model |
Optional[models.TextqlRPCPublicChatLlmModel] | ➖ | N/A |
allow_model_choice |
Optional[bool] | ➖ | Wrapper message for bool.The JSON representation for BoolValue is JSON true and false.Not recommended for use in new APIs, but still useful for legacy APIs and has no plan to be removed. |
clear_allowed_model_ids |
Optional[bool] | ➖ | Clears allowed_models back to "all models allowed". Needed because proto3 cannot distinguish an empty repeated field from an absent one. |
color |
OptionalNullable[str] | ➖ | Omitted preserves the existing value; empty resets to the default. |
icon |
OptionalNullable[str] | ➖ | N/A |
role_id |
Optional[str] | ➖ | Existing role ID. Prefer role_name; if both are supplied they must match. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceUpdateRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Describe what a key is allowed to do.
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.rbac.who_am_i(body={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicRbacWhoAmIRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RBACServiceWhoAmIResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |