Skip to content

Latest commit

 

History

History
1722 lines (1134 loc) · 137 KB

File metadata and controls

1722 lines (1134 loc) · 137 KB

Playbooks

Overview

Available Operations

attach_dashboard

AttachDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.attach_dashboard()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceAttachDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

attach_dataset

AttachDataset

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.attach_dataset()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
dataset_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceAttachDatasetResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

cancel_template_execution

Cancel template execution for a specific template header

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.cancel_template_execution()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
template_header_id Optional[str] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceCancelTemplateExecutionResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

create_playbook

CreatePlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.create_playbook(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicPlaybookCreatePlaybookRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceCreatePlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

deactivate

DeactivatePlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.deactivate()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceDeactivatePlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

delete

DeletePlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.delete()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceDeletePlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

demo_playbook

DemoPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.demo_playbook()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
chat_id Optional[str] ➖ N/A
person_name Optional[str] ➖ N/A
job_title Optional[str] ➖ N/A
target_email Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceDemoPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

deploy

DeployPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.deploy()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceDeployPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

duplicate

DuplicatePlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.duplicate()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceDuplicatePlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

favorite_report

Favorite report management

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.favorite_report()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ UUID
report_id Optional[str] ➖ UUID
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceFavoriteReportResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_active_subscribed_count

GetActiveSubscribedPlaybooksCount

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_active_subscribed_count(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicPlaybookGetActiveSubscribedPlaybooksCountRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetActiveSubscribedPlaybooksCountResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_chat_reports_summary

Lightweight endpoint for chat report drawer - returns summaries without full blocks

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_chat_reports_summary()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
chat_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetChatReportsSummaryResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_members_with

GetMembersWithPlaybooks

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_members_with(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicPlaybookGetMembersWithPlaybooksRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetMembersWithPlaybooksResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

fetch

GetPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.fetch()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
limit Optional[int] ➖ N/A
offset Optional[int] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_batch_run

Get a specific batch run

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_batch_run()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
batch_run_id Optional[str] ➖ UUID
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetPlaybookBatchRunResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_playbook_lineage

GetPlaybookLineage

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_playbook_lineage()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetPlaybookLineageResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_reports

GetPlaybookReports

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_reports()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ UUID
limit Optional[int] ➖ N/A
offset Optional[int] ➖ N/A
chat_id OptionalNullable[str] ➖ UUID
template_data_id OptionalNullable[str] ➖ UUID
batch_run_id OptionalNullable[str] ➖ UUID - filter reports by batch run
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetPlaybookReportsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_playbook_reports_batch

Get reports for multiple template data IDs in a single batch request

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_playbook_reports_batch()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ UUID
template_data_ids List[str] ➖ List of template data UUIDs to fetch reports for
limit_per_template Optional[int] ➖ Max reports to return per template_data_id (default: 100)
batch_run_id OptionalNullable[str] ➖ UUID - filter reports and artifacts by batch run
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetPlaybookReportsBatchResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get

GetPlaybooks

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
member_only Optional[bool] ➖ N/A
limit Optional[int] ➖ N/A
offset Optional[int] ➖ N/A
search_term OptionalNullable[str] ➖ N/A
status_filter Optional[models.TextqlRPCPublicPlaybookPlaybookStatus] ➖ N/A
creator_member_id OptionalNullable[str] ➖ single-select; superseded by creator_member_ids when that is non-empty
sort_by Optional[models.TextqlRPCPublicPlaybookPlaybookSortField] ➖ N/A
sort_direction Optional[models.TextqlRPCPublicCommonSortDirection] ➖ Common enum for sort direction used across multiple services
subscribed_first OptionalNullable[bool] ➖ N/A
only_subscribed OptionalNullable[bool] ➖ N/A
shared_with_me OptionalNullable[bool] ➖ N/A
include_shared_drafts OptionalNullable[bool] ➖ N/A
statuses List[models.TextqlRPCPublicPlaybookPlaybookStatus] ➖ Multi-select filters (union). Each supersedes its single-value counterpart when non-empty.
creator_member_ids List[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetPlaybooksResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_playbooks_previews

GetPlaybooksPreviews

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_playbooks_previews()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
only_subscribed Optional[bool] ➖ N/A
status_filter Optional[models.TextqlRPCPublicPlaybookPlaybookStatus] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetPlaybooksPreviewsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_report_by_id

Get a single report by ID

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.get_report_by_id()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
report_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetReportByIDResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_reports_with_filters

GetReportsWithFilters

Example Usage

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.playbooks.get_reports_with_filters(filters={
        "start_time": parse_datetime("2023-01-15T01:30:15.01Z"),
        "end_time": parse_datetime("2023-01-15T01:30:15.01Z"),
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
filters Optional[models.TextqlRPCPublicPlaybookReportFilters] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceGetReportsWithFiltersResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_slack_channel_context_playbooks

List all Slack channels context playbook mappings for the organization

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.list_slack_channel_context_playbooks(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicPlaybookListAllSlackChannelContextPlaybooksRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceListAllSlackChannelContextPlaybooksResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_all_teams_channel_context_playbooks

ListAllTeamsChannelContextPlaybooks

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.list_all_teams_channel_context_playbooks(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicPlaybookListAllTeamsChannelContextPlaybooksRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceListAllTeamsChannelContextPlaybooksResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_batch_runs

List batch runs for a playbook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.list_batch_runs()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ UUID
limit OptionalNullable[int] ➖ Max number of results (default: 50)
offset OptionalNullable[int] ➖ Offset for pagination (default: 0)
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceListPlaybookBatchRunsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_slack_channels_for_context

List Slack channel IDs where the given playbook is set as the context

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.list_slack_channels_for_context()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ UUID
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceListSlackChannelsForContextPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_teams_channels_for_context_playbook

ListTeamsChannelsForContextPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.list_teams_channels_for_context_playbook()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceListTeamsChannelsForContextPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

mark_report_as_read

Report read tracking

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.mark_report_as_read()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
report_id Optional[str] ➖ UUID
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceMarkReportAsReadResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

preview_slack_report

PreviewSlackReport

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.preview_slack_report()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
cell Optional[models.TextqlRPCPublicCellsReportCell] ➖ N/A
chat_id Optional[str] ➖ N/A
slack_channel_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServicePreviewSlackReportResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

remove_dashboard

RemoveDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.remove_dashboard()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceRemoveDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

remove_dataset

RemoveDataset

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.remove_dataset()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
dataset_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceRemoveDatasetResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

run

RunPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.run()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
dry_run Optional[bool] ➖ If true, runs without sending notifications
template_id OptionalNullable[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceRunPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

set_slack_channel_context_playbook

Set the context playbook for a Slack channel. This associates the given playbook to a Slack channel so that Slack messages in that channel use the playbook's context by default.

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.set_slack_channel_context_playbook()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ The playbook to associate
slack_channel_id Optional[str] ➖ Slack channel ID (e.g., C123...)
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceSetSlackChannelContextPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

set_teams_channel_context

SetTeamsChannelContextPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.set_teams_channel_context()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
teams_channel_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceSetTeamsChannelContextPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

subscribe

SubscribeToPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.subscribe()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceSubscribeToPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

unset_slack_channel_context_playbook

Unset the context playbook for a Slack channel. This clears any association so that messages in this channel no longer use a specific playbook context.

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.unset_slack_channel_context_playbook()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
slack_channel_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceUnsetSlackChannelContextPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

unset_teams_channel_context

UnsetTeamsChannelContextPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.unset_teams_channel_context()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
teams_channel_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceUnsetTeamsChannelContextPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

unsubscribe

UnsubscribeFromPlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.unsubscribe()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceUnsubscribeFromPlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

update

UpdatePlaybook

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.playbooks.update()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
playbook_id Optional[str] ➖ N/A
name OptionalNullable[str] ➖ N/A
prompt OptionalNullable[str] ➖ N/A
status Optional[models.TextqlRPCPublicPlaybookPlaybookStatus] ➖ N/A
trigger_type Optional[models.TextqlRPCPublicPlaybookPlaybookTriggerType] ➖ N/A
cron_string OptionalNullable[str] ➖ N/A
dataset_ids Optional[models.TextqlRPCPublicPlaybookStringList] ➖ N/A
connector_id OptionalNullable[int] ➖ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: use connector_ids instead
reference_report_id OptionalNullable[str] ➖ N/A
paradigm_options Optional[models.TextqlRPCPublicParadigmParadigmOptions] ➖ N/A
paradigm_type Optional[models.TextqlRPCParadigmParamsParadigmType] ➖ N/A
email_addresses Optional[models.TextqlRPCPublicPlaybookStringList] ➖ N/A
slack_channel_id OptionalNullable[str] ➖ N/A
tagged_slack_user_ids Optional[models.TextqlRPCPublicPlaybookStringList] ➖ N/A
report_output_style Optional[models.TextqlRPCPublicPlaybookPlaybookReportStyle] ➖ N/A
template_header_id OptionalNullable[str] ➖ N/A
selected_template_data_ids Optional[models.TextqlRPCPublicPlaybookStringList] ➖ N/A
max_concurrent_templates OptionalNullable[int] ➖ N/A
auto_optimize_concurrency OptionalNullable[bool] ➖ N/A
connector_ids Optional[models.TextqlRPCPublicPlaybookInt32List] ➖ N/A
template_data_filters Optional[models.TextqlRPCPublicPlaybookFilterConditionList] ➖ N/A
llm_model Optional[models.TextqlRPCPublicChatLlmModel] ➖ N/A
chat_access_mode Optional[models.TextqlRPCPublicPlaybookChatAccessMode] ➖ N/A
chat_access_overrides Optional[models.TextqlRPCPublicPlaybookChatAccessOverrideList] ➖ N/A
chat_is_public OptionalNullable[bool] ➖ N/A
dashboard_ids Optional[models.TextqlRPCPublicPlaybookStringList] ➖ N/A
recipient_email_column OptionalNullable[str] ➖ N/A
teams_channel_id OptionalNullable[str] ➖ N/A
tagged_teams_user_aad_ids Optional[models.TextqlRPCPublicPlaybookStringList] ➖ N/A
api_access_key_ids Optional[models.TextqlRPCPublicPlaybookStringList] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PlaybookServiceUpdatePlaybookResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*