Update Connector Access
curl --request PUT \
--url https://app.textql.com/v2/connectors/{id}/access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_public": true,
"grants": [
{
"member_id": "9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10",
"role_id": "80de0196-496f-44fe-9d4c-8013b3b44082",
"group_id": "<string>"
}
]
}
'import requests
url = "https://app.textql.com/v2/connectors/{id}/access"
payload = {
"is_public": True,
"grants": [
{
"member_id": "9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10",
"role_id": "80de0196-496f-44fe-9d4c-8013b3b44082",
"group_id": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_public: true,
grants: [
{
member_id: '9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10',
role_id: '80de0196-496f-44fe-9d4c-8013b3b44082',
group_id: '<string>'
}
]
})
};
fetch('https://app.textql.com/v2/connectors/{id}/access', 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/v2/connectors/{id}/access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'is_public' => true,
'grants' => [
[
'member_id' => '9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10',
'role_id' => '80de0196-496f-44fe-9d4c-8013b3b44082',
'group_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/v2/connectors/{id}/access"
payload := strings.NewReader("{\n \"is_public\": true,\n \"grants\": [\n {\n \"member_id\": \"9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10\",\n \"role_id\": \"80de0196-496f-44fe-9d4c-8013b3b44082\",\n \"group_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://app.textql.com/v2/connectors/{id}/access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_public\": true,\n \"grants\": [\n {\n \"member_id\": \"9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10\",\n \"role_id\": \"80de0196-496f-44fe-9d4c-8013b3b44082\",\n \"group_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/v2/connectors/{id}/access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_public\": true,\n \"grants\": [\n {\n \"member_id\": \"9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10\",\n \"role_id\": \"80de0196-496f-44fe-9d4c-8013b3b44082\",\n \"group_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"is_public": true,
"grants": [
{
"member_id": "9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10",
"role_id": "80de0196-496f-44fe-9d4c-8013b3b44082",
"group_id": "<string>",
"granted_by": "<string>",
"expires_at": "<string>"
}
]
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body"
}
}{
"error": {
"code": "unauthenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "permission_denied",
"message": "Insufficient permissions"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal",
"message": "Internal server error"
}
}Connectors
Update Connector Access
Replace a connector’s visibility and access grants
PUT
/
v2
/
connectors
/
{id}
/
access
Update Connector Access
curl --request PUT \
--url https://app.textql.com/v2/connectors/{id}/access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_public": true,
"grants": [
{
"member_id": "9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10",
"role_id": "80de0196-496f-44fe-9d4c-8013b3b44082",
"group_id": "<string>"
}
]
}
'import requests
url = "https://app.textql.com/v2/connectors/{id}/access"
payload = {
"is_public": True,
"grants": [
{
"member_id": "9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10",
"role_id": "80de0196-496f-44fe-9d4c-8013b3b44082",
"group_id": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_public: true,
grants: [
{
member_id: '9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10',
role_id: '80de0196-496f-44fe-9d4c-8013b3b44082',
group_id: '<string>'
}
]
})
};
fetch('https://app.textql.com/v2/connectors/{id}/access', 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/v2/connectors/{id}/access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'is_public' => true,
'grants' => [
[
'member_id' => '9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10',
'role_id' => '80de0196-496f-44fe-9d4c-8013b3b44082',
'group_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/v2/connectors/{id}/access"
payload := strings.NewReader("{\n \"is_public\": true,\n \"grants\": [\n {\n \"member_id\": \"9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10\",\n \"role_id\": \"80de0196-496f-44fe-9d4c-8013b3b44082\",\n \"group_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://app.textql.com/v2/connectors/{id}/access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_public\": true,\n \"grants\": [\n {\n \"member_id\": \"9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10\",\n \"role_id\": \"80de0196-496f-44fe-9d4c-8013b3b44082\",\n \"group_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/v2/connectors/{id}/access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_public\": true,\n \"grants\": [\n {\n \"member_id\": \"9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10\",\n \"role_id\": \"80de0196-496f-44fe-9d4c-8013b3b44082\",\n \"group_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"is_public": true,
"grants": [
{
"member_id": "9b2f7a64-11d0-4c1b-8f3e-2f9c5b7f6e10",
"role_id": "80de0196-496f-44fe-9d4c-8013b3b44082",
"group_id": "<string>",
"granted_by": "<string>",
"expires_at": "<string>"
}
]
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body"
}
}{
"error": {
"code": "unauthenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "permission_denied",
"message": "Insufficient permissions"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal",
"message": "Internal server error"
}
}Authorizations
API key or JWT token
Path Parameters
Connector ID
Body
application/json
⌘I