Set who uses a connection and which actions run on it
curl --request PATCH \
--url https://api.aisa.one/apis/v1/connector/connections/{connectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shared": true,
"tools": {
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"operations": [
"<string>"
]
}
}
'import requests
url = "https://api.aisa.one/apis/v1/connector/connections/{connectionId}"
payload = {
"shared": True,
"tools": {
"allow": ["<string>"],
"deny": ["<string>"],
"operations": ["<string>"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shared: true,
tools: {allow: ['<string>'], deny: ['<string>'], operations: ['<string>']}
})
};
fetch('https://api.aisa.one/apis/v1/connector/connections/{connectionId}', 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://api.aisa.one/apis/v1/connector/connections/{connectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'shared' => true,
'tools' => [
'allow' => [
'<string>'
],
'deny' => [
'<string>'
],
'operations' => [
'<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://api.aisa.one/apis/v1/connector/connections/{connectionId}"
payload := strings.NewReader("{\n \"shared\": true,\n \"tools\": {\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"operations\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.aisa.one/apis/v1/connector/connections/{connectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shared\": true,\n \"tools\": {\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"operations\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/connector/connections/{connectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shared\": true,\n \"tools\": {\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"operations\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"app": "<string>",
"connectedAt": "2023-11-07T05:31:56Z",
"externalUserId": "<string>",
"id": "<string>",
"manageable": true,
"scopes": [
"<string>"
],
"shared": true,
"status": "<string>",
"tools": {
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"operations": [
"<string>"
]
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}AIsa Connect
Set who uses a connection and which actions run on it
Shares a connection with the team, or stops sharing it, and sets which actions run on it: those of the operation types in tools.operations, plus the action keys in tools.allow, minus those in tools.deny. A run of any other action is refused with action_not_allowed before anything is sent. Only the member who connected it changes a connection; the team’s owners and admins change those made before members were recorded.
PATCH
https://api.aisa.one
/
apis
/
v1
/
connector
/
connections
/
{connectionId}
Set who uses a connection and which actions run on it
curl --request PATCH \
--url https://api.aisa.one/apis/v1/connector/connections/{connectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shared": true,
"tools": {
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"operations": [
"<string>"
]
}
}
'import requests
url = "https://api.aisa.one/apis/v1/connector/connections/{connectionId}"
payload = {
"shared": True,
"tools": {
"allow": ["<string>"],
"deny": ["<string>"],
"operations": ["<string>"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shared: true,
tools: {allow: ['<string>'], deny: ['<string>'], operations: ['<string>']}
})
};
fetch('https://api.aisa.one/apis/v1/connector/connections/{connectionId}', 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://api.aisa.one/apis/v1/connector/connections/{connectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'shared' => true,
'tools' => [
'allow' => [
'<string>'
],
'deny' => [
'<string>'
],
'operations' => [
'<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://api.aisa.one/apis/v1/connector/connections/{connectionId}"
payload := strings.NewReader("{\n \"shared\": true,\n \"tools\": {\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"operations\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.aisa.one/apis/v1/connector/connections/{connectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shared\": true,\n \"tools\": {\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"operations\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/connector/connections/{connectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shared\": true,\n \"tools\": {\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"operations\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"app": "<string>",
"connectedAt": "2023-11-07T05:31:56Z",
"externalUserId": "<string>",
"id": "<string>",
"manageable": true,
"scopes": [
"<string>"
],
"shared": true,
"status": "<string>",
"tools": {
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"operations": [
"<string>"
]
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}Request contract
- Method and path: PATCH /apis/v1/connector/connections/{connectionId}
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/connector/connections/{connectionId} - connectionId: path; required
{
"operationId": "patch_aisa_connector_apis_v1_connector_connection_b41217",
"method": "PATCH",
"path": "/apis/v1/connector/connections/{connectionId}",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"in": "path",
"name": "connectionId",
"required": true,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"shared": {
"description": "true shares the connection with the whole team; false keeps it to the member who connected it.",
"type": [
"boolean",
"null"
]
},
"tools": {
"additionalProperties": false,
"description": "The actions that run on the connection. It replaces the connection's tools whole; every member is required.",
"properties": {
"allow": {
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"deny": {
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"operations": {
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
}
},
"type": [
"object",
"null"
]
}
},
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
No additional charge for this operation.Authorizations
Body
application/json