Python (SDK)
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.apps.update()
# 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.apps.update({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.app.AppService/UpdateApp \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"appId": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"dataSources": [
{
"file": {
"datasetId": "<string>",
"fileName": "<string>",
"sheetIndex": 123
},
"type": "<string>",
"name": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"default": "<string>"
}
],
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"replaceDataSources": true,
"publish": true,
"computeFunctions": [
{
"name": "<string>",
"description": "<string>",
"params": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"returns": "<string>",
"code": "<string>",
"tqlPath": "<string>",
"tql": "<string>",
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"replaceComputeFunctions": true,
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"replaceFiles": true,
"scheduleEnabled": true,
"cronString": "<string>",
"capabilities": [
{
"type": "<string>",
"name": "<string>",
"connectorId": 123,
"statement": "<string>",
"scope": "<string>",
"subject": "<string>",
"body": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"replaceCapabilities": true,
"appDbSetup": [
"<string>"
],
"replaceAppDbSetup": true
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
appId: '<string>',
name: '<string>',
description: '<string>',
code: '<string>',
dataSources: [
{
file: {datasetId: '<string>', fileName: '<string>', sheetIndex: 123},
type: '<string>',
name: '<string>',
parameters: [{name: '<string>', type: '<string>', default: '<string>'}],
grant: {roles: ['<string>'], members: ['<string>']}
}
],
replaceDataSources: true,
publish: true,
computeFunctions: [
{
name: '<string>',
description: '<string>',
params: [{name: '<string>', type: '<string>', description: '<string>'}],
returns: '<string>',
code: '<string>',
tqlPath: '<string>',
tql: '<string>',
grant: {roles: ['<string>'], members: ['<string>']}
}
],
replaceComputeFunctions: true,
files: [{path: '<string>', content: '<string>'}],
replaceFiles: true,
scheduleEnabled: true,
cronString: '<string>',
capabilities: [
{
type: '<string>',
name: '<string>',
connectorId: 123,
statement: '<string>',
scope: '<string>',
subject: '<string>',
body: JSON.stringify('<string>'),
parameters: [{name: '<string>', type: '<string>', description: '<string>'}]
}
],
replaceCapabilities: true,
appDbSetup: ['<string>'],
replaceAppDbSetup: true
})
};
fetch('https://app.textql.com/textql.rpc.public.app.AppService/UpdateApp', 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.app.AppService/UpdateApp",
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([
'appId' => '<string>',
'name' => '<string>',
'description' => '<string>',
'code' => '<string>',
'dataSources' => [
[
'file' => [
'datasetId' => '<string>',
'fileName' => '<string>',
'sheetIndex' => 123
],
'type' => '<string>',
'name' => '<string>',
'parameters' => [
[
'name' => '<string>',
'type' => '<string>',
'default' => '<string>'
]
],
'grant' => [
'roles' => [
'<string>'
],
'members' => [
'<string>'
]
]
]
],
'replaceDataSources' => true,
'publish' => true,
'computeFunctions' => [
[
'name' => '<string>',
'description' => '<string>',
'params' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
],
'returns' => '<string>',
'code' => '<string>',
'tqlPath' => '<string>',
'tql' => '<string>',
'grant' => [
'roles' => [
'<string>'
],
'members' => [
'<string>'
]
]
]
],
'replaceComputeFunctions' => true,
'files' => [
[
'path' => '<string>',
'content' => '<string>'
]
],
'replaceFiles' => true,
'scheduleEnabled' => true,
'cronString' => '<string>',
'capabilities' => [
[
'type' => '<string>',
'name' => '<string>',
'connectorId' => 123,
'statement' => '<string>',
'scope' => '<string>',
'subject' => '<string>',
'body' => '<string>',
'parameters' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
]
]
],
'replaceCapabilities' => true,
'appDbSetup' => [
'<string>'
],
'replaceAppDbSetup' => true
]),
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.app.AppService/UpdateApp"
payload := strings.NewReader("{\n \"appId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"dataSources\": [\n {\n \"file\": {\n \"datasetId\": \"<string>\",\n \"fileName\": \"<string>\",\n \"sheetIndex\": 123\n },\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default\": \"<string>\"\n }\n ],\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceDataSources\": true,\n \"publish\": true,\n \"computeFunctions\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"returns\": \"<string>\",\n \"code\": \"<string>\",\n \"tqlPath\": \"<string>\",\n \"tql\": \"<string>\",\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceComputeFunctions\": true,\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"replaceFiles\": true,\n \"scheduleEnabled\": true,\n \"cronString\": \"<string>\",\n \"capabilities\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"connectorId\": 123,\n \"statement\": \"<string>\",\n \"scope\": \"<string>\",\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"replaceCapabilities\": true,\n \"appDbSetup\": [\n \"<string>\"\n ],\n \"replaceAppDbSetup\": true\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.app.AppService/UpdateApp")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"dataSources\": [\n {\n \"file\": {\n \"datasetId\": \"<string>\",\n \"fileName\": \"<string>\",\n \"sheetIndex\": 123\n },\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default\": \"<string>\"\n }\n ],\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceDataSources\": true,\n \"publish\": true,\n \"computeFunctions\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"returns\": \"<string>\",\n \"code\": \"<string>\",\n \"tqlPath\": \"<string>\",\n \"tql\": \"<string>\",\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceComputeFunctions\": true,\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"replaceFiles\": true,\n \"scheduleEnabled\": true,\n \"cronString\": \"<string>\",\n \"capabilities\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"connectorId\": 123,\n \"statement\": \"<string>\",\n \"scope\": \"<string>\",\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"replaceCapabilities\": true,\n \"appDbSetup\": [\n \"<string>\"\n ],\n \"replaceAppDbSetup\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.app.AppService/UpdateApp")
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 \"appId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"dataSources\": [\n {\n \"file\": {\n \"datasetId\": \"<string>\",\n \"fileName\": \"<string>\",\n \"sheetIndex\": 123\n },\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default\": \"<string>\"\n }\n ],\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceDataSources\": true,\n \"publish\": true,\n \"computeFunctions\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"returns\": \"<string>\",\n \"code\": \"<string>\",\n \"tqlPath\": \"<string>\",\n \"tql\": \"<string>\",\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceComputeFunctions\": true,\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"replaceFiles\": true,\n \"scheduleEnabled\": true,\n \"cronString\": \"<string>\",\n \"capabilities\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"connectorId\": 123,\n \"statement\": \"<string>\",\n \"scope\": \"<string>\",\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"replaceCapabilities\": true,\n \"appDbSetup\": [\n \"<string>\"\n ],\n \"replaceAppDbSetup\": true\n}"
response = http.request(request)
puts response.read_body{
"app": {
"id": "<string>",
"orgId": "<string>",
"creatorId": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"dataSources": [
{
"file": {
"datasetId": "<string>",
"fileName": "<string>",
"sheetIndex": 123
},
"type": "<string>",
"name": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"default": "<string>"
}
],
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"htmlUrl": "<string>",
"screenshotUrl": "<string>",
"consoleErrors": [
"<string>"
],
"chatId": "<string>",
"publishedHtmlUrl": "<string>",
"hasUnpublishedChanges": true,
"computeFunctions": [
{
"name": "<string>",
"description": "<string>",
"params": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"returns": "<string>",
"code": "<string>",
"tqlPath": "<string>",
"tql": "<string>",
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"scheduleEnabled": true,
"cronString": "<string>",
"folderId": "<string>",
"isFavorited": true,
"capabilities": [
{
"type": "<string>",
"name": "<string>",
"connectorId": 123,
"statement": "<string>",
"scope": "<string>",
"subject": "<string>",
"body": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"appDbSetup": [
"<string>"
],
"memberFeaturesEnabled": true,
"usesMemberFeatures": true,
"viewerGrants": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"refreshedAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}App Service
Update App
POST
/
textql.rpc.public.app.AppService
/
UpdateApp
Python (SDK)
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.apps.update()
# 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.apps.update({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.app.AppService/UpdateApp \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"appId": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"dataSources": [
{
"file": {
"datasetId": "<string>",
"fileName": "<string>",
"sheetIndex": 123
},
"type": "<string>",
"name": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"default": "<string>"
}
],
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"replaceDataSources": true,
"publish": true,
"computeFunctions": [
{
"name": "<string>",
"description": "<string>",
"params": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"returns": "<string>",
"code": "<string>",
"tqlPath": "<string>",
"tql": "<string>",
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"replaceComputeFunctions": true,
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"replaceFiles": true,
"scheduleEnabled": true,
"cronString": "<string>",
"capabilities": [
{
"type": "<string>",
"name": "<string>",
"connectorId": 123,
"statement": "<string>",
"scope": "<string>",
"subject": "<string>",
"body": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"replaceCapabilities": true,
"appDbSetup": [
"<string>"
],
"replaceAppDbSetup": true
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
appId: '<string>',
name: '<string>',
description: '<string>',
code: '<string>',
dataSources: [
{
file: {datasetId: '<string>', fileName: '<string>', sheetIndex: 123},
type: '<string>',
name: '<string>',
parameters: [{name: '<string>', type: '<string>', default: '<string>'}],
grant: {roles: ['<string>'], members: ['<string>']}
}
],
replaceDataSources: true,
publish: true,
computeFunctions: [
{
name: '<string>',
description: '<string>',
params: [{name: '<string>', type: '<string>', description: '<string>'}],
returns: '<string>',
code: '<string>',
tqlPath: '<string>',
tql: '<string>',
grant: {roles: ['<string>'], members: ['<string>']}
}
],
replaceComputeFunctions: true,
files: [{path: '<string>', content: '<string>'}],
replaceFiles: true,
scheduleEnabled: true,
cronString: '<string>',
capabilities: [
{
type: '<string>',
name: '<string>',
connectorId: 123,
statement: '<string>',
scope: '<string>',
subject: '<string>',
body: JSON.stringify('<string>'),
parameters: [{name: '<string>', type: '<string>', description: '<string>'}]
}
],
replaceCapabilities: true,
appDbSetup: ['<string>'],
replaceAppDbSetup: true
})
};
fetch('https://app.textql.com/textql.rpc.public.app.AppService/UpdateApp', 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.app.AppService/UpdateApp",
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([
'appId' => '<string>',
'name' => '<string>',
'description' => '<string>',
'code' => '<string>',
'dataSources' => [
[
'file' => [
'datasetId' => '<string>',
'fileName' => '<string>',
'sheetIndex' => 123
],
'type' => '<string>',
'name' => '<string>',
'parameters' => [
[
'name' => '<string>',
'type' => '<string>',
'default' => '<string>'
]
],
'grant' => [
'roles' => [
'<string>'
],
'members' => [
'<string>'
]
]
]
],
'replaceDataSources' => true,
'publish' => true,
'computeFunctions' => [
[
'name' => '<string>',
'description' => '<string>',
'params' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
],
'returns' => '<string>',
'code' => '<string>',
'tqlPath' => '<string>',
'tql' => '<string>',
'grant' => [
'roles' => [
'<string>'
],
'members' => [
'<string>'
]
]
]
],
'replaceComputeFunctions' => true,
'files' => [
[
'path' => '<string>',
'content' => '<string>'
]
],
'replaceFiles' => true,
'scheduleEnabled' => true,
'cronString' => '<string>',
'capabilities' => [
[
'type' => '<string>',
'name' => '<string>',
'connectorId' => 123,
'statement' => '<string>',
'scope' => '<string>',
'subject' => '<string>',
'body' => '<string>',
'parameters' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
]
]
],
'replaceCapabilities' => true,
'appDbSetup' => [
'<string>'
],
'replaceAppDbSetup' => true
]),
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.app.AppService/UpdateApp"
payload := strings.NewReader("{\n \"appId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"dataSources\": [\n {\n \"file\": {\n \"datasetId\": \"<string>\",\n \"fileName\": \"<string>\",\n \"sheetIndex\": 123\n },\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default\": \"<string>\"\n }\n ],\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceDataSources\": true,\n \"publish\": true,\n \"computeFunctions\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"returns\": \"<string>\",\n \"code\": \"<string>\",\n \"tqlPath\": \"<string>\",\n \"tql\": \"<string>\",\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceComputeFunctions\": true,\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"replaceFiles\": true,\n \"scheduleEnabled\": true,\n \"cronString\": \"<string>\",\n \"capabilities\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"connectorId\": 123,\n \"statement\": \"<string>\",\n \"scope\": \"<string>\",\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"replaceCapabilities\": true,\n \"appDbSetup\": [\n \"<string>\"\n ],\n \"replaceAppDbSetup\": true\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.app.AppService/UpdateApp")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"dataSources\": [\n {\n \"file\": {\n \"datasetId\": \"<string>\",\n \"fileName\": \"<string>\",\n \"sheetIndex\": 123\n },\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default\": \"<string>\"\n }\n ],\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceDataSources\": true,\n \"publish\": true,\n \"computeFunctions\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"returns\": \"<string>\",\n \"code\": \"<string>\",\n \"tqlPath\": \"<string>\",\n \"tql\": \"<string>\",\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceComputeFunctions\": true,\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"replaceFiles\": true,\n \"scheduleEnabled\": true,\n \"cronString\": \"<string>\",\n \"capabilities\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"connectorId\": 123,\n \"statement\": \"<string>\",\n \"scope\": \"<string>\",\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"replaceCapabilities\": true,\n \"appDbSetup\": [\n \"<string>\"\n ],\n \"replaceAppDbSetup\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.app.AppService/UpdateApp")
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 \"appId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"dataSources\": [\n {\n \"file\": {\n \"datasetId\": \"<string>\",\n \"fileName\": \"<string>\",\n \"sheetIndex\": 123\n },\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default\": \"<string>\"\n }\n ],\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceDataSources\": true,\n \"publish\": true,\n \"computeFunctions\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"params\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"returns\": \"<string>\",\n \"code\": \"<string>\",\n \"tqlPath\": \"<string>\",\n \"tql\": \"<string>\",\n \"grant\": {\n \"roles\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"replaceComputeFunctions\": true,\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"replaceFiles\": true,\n \"scheduleEnabled\": true,\n \"cronString\": \"<string>\",\n \"capabilities\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"connectorId\": 123,\n \"statement\": \"<string>\",\n \"scope\": \"<string>\",\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"replaceCapabilities\": true,\n \"appDbSetup\": [\n \"<string>\"\n ],\n \"replaceAppDbSetup\": true\n}"
response = http.request(request)
puts response.read_body{
"app": {
"id": "<string>",
"orgId": "<string>",
"creatorId": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"dataSources": [
{
"file": {
"datasetId": "<string>",
"fileName": "<string>",
"sheetIndex": 123
},
"type": "<string>",
"name": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"default": "<string>"
}
],
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"htmlUrl": "<string>",
"screenshotUrl": "<string>",
"consoleErrors": [
"<string>"
],
"chatId": "<string>",
"publishedHtmlUrl": "<string>",
"hasUnpublishedChanges": true,
"computeFunctions": [
{
"name": "<string>",
"description": "<string>",
"params": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"returns": "<string>",
"code": "<string>",
"tqlPath": "<string>",
"tql": "<string>",
"grant": {
"roles": [
"<string>"
],
"members": [
"<string>"
]
}
}
],
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"scheduleEnabled": true,
"cronString": "<string>",
"folderId": "<string>",
"isFavorited": true,
"capabilities": [
{
"type": "<string>",
"name": "<string>",
"connectorId": 123,
"statement": "<string>",
"scope": "<string>",
"subject": "<string>",
"body": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"appDbSetup": [
"<string>"
],
"memberFeaturesEnabled": true,
"usesMemberFeatures": true,
"viewerGrants": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"refreshedAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z"
}
}{
"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
Unified data source for dashboards
- DataSource
- DataSource
- DataSource
- DataSource
- DataSource
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
⌘I