Update a custom automation endpoint
curl --request PATCH \
--url https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id} \
--header 'Content-Type: application/json' \
--data '
{
"response_template": {},
"request_schema": {},
"is_active": true,
"rpa_run_id": "<string>",
"parameter_mapping": {}
}
'import requests
url = "https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}"
payload = {
"response_template": {},
"request_schema": {},
"is_active": True,
"rpa_run_id": "<string>",
"parameter_mapping": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
response_template: {},
request_schema: {},
is_active: true,
rpa_run_id: '<string>',
parameter_mapping: {}
})
};
fetch('https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}', 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.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}",
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([
'response_template' => [
],
'request_schema' => [
],
'is_active' => true,
'rpa_run_id' => '<string>',
'parameter_mapping' => [
]
]),
CURLOPT_HTTPHEADER => [
"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.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}"
payload := strings.NewReader("{\n \"response_template\": {},\n \"request_schema\": {},\n \"is_active\": true,\n \"rpa_run_id\": \"<string>\",\n \"parameter_mapping\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}")
.header("Content-Type", "application/json")
.body("{\n \"response_template\": {},\n \"request_schema\": {},\n \"is_active\": true,\n \"rpa_run_id\": \"<string>\",\n \"parameter_mapping\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"response_template\": {},\n \"request_schema\": {},\n \"is_active\": true,\n \"rpa_run_id\": \"<string>\",\n \"parameter_mapping\": {}\n}"
response = http.request(request)
puts response.read_body{
"endpoint": {
"endpoint_id": "<string>",
"slug": "<string>",
"method": "<string>",
"response_template": {},
"request_schema": {},
"is_active": true,
"created_at": "<string>",
"updated_at": "<string>",
"rpa_run_id": "<string>",
"parameter_mapping": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Organization Automations
Update Endpoint
Update endpoint configuration
PATCH
/
api
/
organizations
/
{organization_id}
/
automations
/
endpoints
/
{endpoint_id}
Update a custom automation endpoint
curl --request PATCH \
--url https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id} \
--header 'Content-Type: application/json' \
--data '
{
"response_template": {},
"request_schema": {},
"is_active": true,
"rpa_run_id": "<string>",
"parameter_mapping": {}
}
'import requests
url = "https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}"
payload = {
"response_template": {},
"request_schema": {},
"is_active": True,
"rpa_run_id": "<string>",
"parameter_mapping": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
response_template: {},
request_schema: {},
is_active: true,
rpa_run_id: '<string>',
parameter_mapping: {}
})
};
fetch('https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}', 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.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}",
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([
'response_template' => [
],
'request_schema' => [
],
'is_active' => true,
'rpa_run_id' => '<string>',
'parameter_mapping' => [
]
]),
CURLOPT_HTTPHEADER => [
"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.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}"
payload := strings.NewReader("{\n \"response_template\": {},\n \"request_schema\": {},\n \"is_active\": true,\n \"rpa_run_id\": \"<string>\",\n \"parameter_mapping\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}")
.header("Content-Type", "application/json")
.body("{\n \"response_template\": {},\n \"request_schema\": {},\n \"is_active\": true,\n \"rpa_run_id\": \"<string>\",\n \"parameter_mapping\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"response_template\": {},\n \"request_schema\": {},\n \"is_active\": true,\n \"rpa_run_id\": \"<string>\",\n \"parameter_mapping\": {}\n}"
response = http.request(request)
puts response.read_body{
"endpoint": {
"endpoint_id": "<string>",
"slug": "<string>",
"method": "<string>",
"response_template": {},
"request_schema": {},
"is_active": true,
"created_at": "<string>",
"updated_at": "<string>",
"rpa_run_id": "<string>",
"parameter_mapping": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Request to update a custom automation endpoint
Updated response template
Updated request schema
Whether the endpoint is active
Updated RPA run_id link
Updated parameter mapping
Response
Successful Response
Response containing a single endpoint
Endpoint information
Show child attributes
Show child attributes
⌘I