Python (SDK)
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)import { Textql } from "@textql/sdk";
const textql = new Textql({
apiKey: process.env["TEXTQL_API_KEY"] ?? "",
});
async function run() {
const result = await textql.playbooks.get({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"memberOnly": true,
"limit": 123,
"offset": 123,
"searchTerm": "<string>",
"creatorMemberId": "<string>",
"subscribedFirst": true,
"onlySubscribed": true,
"sharedWithMe": true,
"includeSharedDrafts": true,
"statuses": [],
"creatorMemberIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
memberOnly: true,
limit: 123,
offset: 123,
searchTerm: '<string>',
creatorMemberId: '<string>',
subscribedFirst: true,
onlySubscribed: true,
sharedWithMe: true,
includeSharedDrafts: true,
statuses: [],
creatorMemberIds: ['<string>']
})
};
fetch('https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'memberOnly' => true,
'limit' => 123,
'offset' => 123,
'searchTerm' => '<string>',
'creatorMemberId' => '<string>',
'subscribedFirst' => true,
'onlySubscribed' => true,
'sharedWithMe' => true,
'includeSharedDrafts' => true,
'statuses' => [
],
'creatorMemberIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json",
"tql_api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks"
payload := strings.NewReader("{\n \"memberOnly\": true,\n \"limit\": 123,\n \"offset\": 123,\n \"searchTerm\": \"<string>\",\n \"creatorMemberId\": \"<string>\",\n \"subscribedFirst\": true,\n \"onlySubscribed\": true,\n \"sharedWithMe\": true,\n \"includeSharedDrafts\": true,\n \"statuses\": [],\n \"creatorMemberIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("tql_api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"memberOnly\": true,\n \"limit\": 123,\n \"offset\": 123,\n \"searchTerm\": \"<string>\",\n \"creatorMemberId\": \"<string>\",\n \"subscribedFirst\": true,\n \"onlySubscribed\": true,\n \"sharedWithMe\": true,\n \"includeSharedDrafts\": true,\n \"statuses\": [],\n \"creatorMemberIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["tql_api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memberOnly\": true,\n \"limit\": 123,\n \"offset\": 123,\n \"searchTerm\": \"<string>\",\n \"creatorMemberId\": \"<string>\",\n \"subscribedFirst\": true,\n \"onlySubscribed\": true,\n \"sharedWithMe\": true,\n \"includeSharedDrafts\": true,\n \"statuses\": [],\n \"creatorMemberIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"playbooks": [
{
"id": "<string>",
"orgId": "<string>",
"memberId": "<string>",
"connectorId": 123,
"name": "<string>",
"prompt": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"cronString": "<string>",
"datasetIds": [
"<string>"
],
"referenceReportId": "<string>",
"latestChatId": "<string>",
"emailAddresses": [
"<string>"
],
"slackChannelId": "<string>",
"taggedSlackUserIds": [
"<string>"
],
"paradigmOptions": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
},
"isRunning": true,
"owner": {
"memberId": "<string>",
"memberEmail": "<string>",
"memberName": "<string>",
"memberPictureUrl": "<string>"
},
"hasWritePermission": true,
"isSubscribed": true,
"templateHeaderId": "<string>",
"selectedTemplateDataIds": [
"<string>"
],
"maxConcurrentTemplates": 123,
"autoOptimizeConcurrency": true,
"connectorIds": [
123
],
"templateDataFilters": [
{
"field": "<string>",
"operator": "<string>",
"value": "<string>"
}
],
"parentPlaybookId": "<string>",
"originPlaybookId": "<string>",
"duplicatedByMemberId": "<string>",
"duplicatedAt": "2023-11-07T05:31:56Z",
"chatAccessOverrides": [
{
"memberId": "<string>",
"roleId": "<string>",
"accessType": "<string>"
}
],
"chatIsPublic": true,
"dashboardIds": [
"<string>"
],
"recipientEmailColumn": "<string>",
"teamsChannelId": "<string>",
"taggedTeamsUserAadIds": [
"<string>"
],
"configSource": {
"filePath": "<string>",
"syncError": "<string>",
"breakingPatchId": "<string>"
},
"apiAccessKeyIds": [
"<string>"
]
}
],
"totalCount": 123
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Playbook Service
Get Playbooks
POST
/
textql.rpc.public.playbook.PlaybookService
/
GetPlaybooks
Python (SDK)
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)import { Textql } from "@textql/sdk";
const textql = new Textql({
apiKey: process.env["TEXTQL_API_KEY"] ?? "",
});
async function run() {
const result = await textql.playbooks.get({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"memberOnly": true,
"limit": 123,
"offset": 123,
"searchTerm": "<string>",
"creatorMemberId": "<string>",
"subscribedFirst": true,
"onlySubscribed": true,
"sharedWithMe": true,
"includeSharedDrafts": true,
"statuses": [],
"creatorMemberIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
memberOnly: true,
limit: 123,
offset: 123,
searchTerm: '<string>',
creatorMemberId: '<string>',
subscribedFirst: true,
onlySubscribed: true,
sharedWithMe: true,
includeSharedDrafts: true,
statuses: [],
creatorMemberIds: ['<string>']
})
};
fetch('https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'memberOnly' => true,
'limit' => 123,
'offset' => 123,
'searchTerm' => '<string>',
'creatorMemberId' => '<string>',
'subscribedFirst' => true,
'onlySubscribed' => true,
'sharedWithMe' => true,
'includeSharedDrafts' => true,
'statuses' => [
],
'creatorMemberIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json",
"tql_api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks"
payload := strings.NewReader("{\n \"memberOnly\": true,\n \"limit\": 123,\n \"offset\": 123,\n \"searchTerm\": \"<string>\",\n \"creatorMemberId\": \"<string>\",\n \"subscribedFirst\": true,\n \"onlySubscribed\": true,\n \"sharedWithMe\": true,\n \"includeSharedDrafts\": true,\n \"statuses\": [],\n \"creatorMemberIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("tql_api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"memberOnly\": true,\n \"limit\": 123,\n \"offset\": 123,\n \"searchTerm\": \"<string>\",\n \"creatorMemberId\": \"<string>\",\n \"subscribedFirst\": true,\n \"onlySubscribed\": true,\n \"sharedWithMe\": true,\n \"includeSharedDrafts\": true,\n \"statuses\": [],\n \"creatorMemberIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.playbook.PlaybookService/GetPlaybooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["tql_api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memberOnly\": true,\n \"limit\": 123,\n \"offset\": 123,\n \"searchTerm\": \"<string>\",\n \"creatorMemberId\": \"<string>\",\n \"subscribedFirst\": true,\n \"onlySubscribed\": true,\n \"sharedWithMe\": true,\n \"includeSharedDrafts\": true,\n \"statuses\": [],\n \"creatorMemberIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"playbooks": [
{
"id": "<string>",
"orgId": "<string>",
"memberId": "<string>",
"connectorId": 123,
"name": "<string>",
"prompt": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"cronString": "<string>",
"datasetIds": [
"<string>"
],
"referenceReportId": "<string>",
"latestChatId": "<string>",
"emailAddresses": [
"<string>"
],
"slackChannelId": "<string>",
"taggedSlackUserIds": [
"<string>"
],
"paradigmOptions": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
},
"isRunning": true,
"owner": {
"memberId": "<string>",
"memberEmail": "<string>",
"memberName": "<string>",
"memberPictureUrl": "<string>"
},
"hasWritePermission": true,
"isSubscribed": true,
"templateHeaderId": "<string>",
"selectedTemplateDataIds": [
"<string>"
],
"maxConcurrentTemplates": 123,
"autoOptimizeConcurrency": true,
"connectorIds": [
123
],
"templateDataFilters": [
{
"field": "<string>",
"operator": "<string>",
"value": "<string>"
}
],
"parentPlaybookId": "<string>",
"originPlaybookId": "<string>",
"duplicatedByMemberId": "<string>",
"duplicatedAt": "2023-11-07T05:31:56Z",
"chatAccessOverrides": [
{
"memberId": "<string>",
"roleId": "<string>",
"accessType": "<string>"
}
],
"chatIsPublic": true,
"dashboardIds": [
"<string>"
],
"recipientEmailColumn": "<string>",
"teamsChannelId": "<string>",
"taggedTeamsUserAadIds": [
"<string>"
],
"configSource": {
"filePath": "<string>",
"syncError": "<string>",
"breakingPatchId": "<string>"
},
"apiAccessKeyIds": [
"<string>"
]
}
],
"totalCount": 123
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
Headers
Define the version of the Connect protocol
Available options:
1 Define the timeout, in ms
Body
application/json
single-select; superseded by statuses when that is non-empty
Available options:
STATUS_UNKNOWN, STATUS_ACTIVE, STATUS_INACTIVE, STATUS_EMPTY, ALL_PLAYBOOKS single-select; superseded by creator_member_ids when that is non-empty
Available options:
SORT_FIELD_UNKNOWN, SORT_FIELD_NAME, SORT_FIELD_CREATED_AT, SORT_FIELD_UPDATED_AT, SORT_FIELD_SCHEDULE Common enum for sort direction used across multiple services
Available options:
SORT_DIRECTION_UNKNOWN, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC Multi-select filters (union). Each supersedes its single-value counterpart when non-empty.
Available options:
STATUS_UNKNOWN, STATUS_ACTIVE, STATUS_INACTIVE, STATUS_EMPTY, ALL_PLAYBOOKS ⌘I