Sync declarative configuration
curl --request POST \
--url http://localhost:9601/workspaces/{ws_id}/config/sync \
--header 'Content-Type: application/json' \
--data '
{
"endpoints": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"request": {
"method": "POST",
"headers": null,
"timeout": 10000
},
"retry": {
"strategy": "fixed",
"config": {
"attempts": [
0,
60,
3600
]
}
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": true,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
],
"sources": [
{
"config": {
"http": {
"methods": [
"POST"
]
}
},
"id": "<string>",
"name": "<string>",
"enabled": true,
"type": "http",
"async": false,
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": true,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
]
}
'import requests
url = "http://localhost:9601/workspaces/{ws_id}/config/sync"
payload = {
"endpoints": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": True,
"request": {
"method": "POST",
"headers": None,
"timeout": 10000
},
"retry": {
"strategy": "fixed",
"config": { "attempts": [0, 60, 3600] }
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": True,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
],
"sources": [
{
"config": { "http": { "methods": ["POST"] } },
"id": "<string>",
"name": "<string>",
"enabled": True,
"type": "http",
"async": False,
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": True,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
endpoints: [
{
id: '<string>',
name: '<string>',
description: '<string>',
enabled: true,
request: {method: 'POST', headers: null, timeout: 10000},
retry: {strategy: 'fixed', config: {attempts: [0, 60, 3600]}},
events: [],
metadata: {},
rate_limit: {quota: 1, period: 2},
plugins: [
{
id: '<string>',
name: '<string>',
enabled: true,
endpoint_id: '<string>',
source_id: '<string>',
config: {},
metadata: {}
}
]
}
],
sources: [
{
config: {http: {methods: ['POST']}},
id: '<string>',
name: '<string>',
enabled: true,
type: 'http',
async: false,
metadata: {},
rate_limit: {quota: 1, period: 2},
plugins: [
{
id: '<string>',
name: '<string>',
enabled: true,
endpoint_id: '<string>',
source_id: '<string>',
config: {},
metadata: {}
}
]
}
]
})
};
fetch('http://localhost:9601/workspaces/{ws_id}/config/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9601",
CURLOPT_URL => "http://localhost:9601/workspaces/{ws_id}/config/sync",
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([
'endpoints' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'request' => [
'method' => 'POST',
'headers' => null,
'timeout' => 10000
],
'retry' => [
'strategy' => 'fixed',
'config' => [
'attempts' => [
0,
60,
3600
]
]
],
'events' => [
],
'metadata' => [
],
'rate_limit' => [
'quota' => 1,
'period' => 2
],
'plugins' => [
[
'id' => '<string>',
'name' => '<string>',
'enabled' => true,
'endpoint_id' => '<string>',
'source_id' => '<string>',
'config' => [
],
'metadata' => [
]
]
]
]
],
'sources' => [
[
'config' => [
'http' => [
'methods' => [
'POST'
]
]
],
'id' => '<string>',
'name' => '<string>',
'enabled' => true,
'type' => 'http',
'async' => false,
'metadata' => [
],
'rate_limit' => [
'quota' => 1,
'period' => 2
],
'plugins' => [
[
'id' => '<string>',
'name' => '<string>',
'enabled' => true,
'endpoint_id' => '<string>',
'source_id' => '<string>',
'config' => [
],
'metadata' => [
]
]
]
]
]
]),
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 := "http://localhost:9601/workspaces/{ws_id}/config/sync"
payload := strings.NewReader("{\n \"endpoints\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"request\": {\n \"method\": \"POST\",\n \"headers\": null,\n \"timeout\": 10000\n },\n \"retry\": {\n \"strategy\": \"fixed\",\n \"config\": {\n \"attempts\": [\n 0,\n 60,\n 3600\n ]\n }\n },\n \"events\": [],\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ],\n \"sources\": [\n {\n \"config\": {\n \"http\": {\n \"methods\": [\n \"POST\"\n ]\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"type\": \"http\",\n \"async\": false,\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:9601/workspaces/{ws_id}/config/sync")
.header("Content-Type", "application/json")
.body("{\n \"endpoints\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"request\": {\n \"method\": \"POST\",\n \"headers\": null,\n \"timeout\": 10000\n },\n \"retry\": {\n \"strategy\": \"fixed\",\n \"config\": {\n \"attempts\": [\n 0,\n 60,\n 3600\n ]\n }\n },\n \"events\": [],\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ],\n \"sources\": [\n {\n \"config\": {\n \"http\": {\n \"methods\": [\n \"POST\"\n ]\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"type\": \"http\",\n \"async\": false,\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9601/workspaces/{ws_id}/config/sync")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoints\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"request\": {\n \"method\": \"POST\",\n \"headers\": null,\n \"timeout\": 10000\n },\n \"retry\": {\n \"strategy\": \"fixed\",\n \"config\": {\n \"attempts\": [\n 0,\n 60,\n 3600\n ]\n }\n },\n \"events\": [],\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ],\n \"sources\": [\n {\n \"config\": {\n \"http\": {\n \"methods\": [\n \"POST\"\n ]\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"type\": \"http\",\n \"async\": false,\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyDeclarative
Sync declarative configuration
POST
/
workspaces
/
{ws_id}
/
config
/
sync
Sync declarative configuration
curl --request POST \
--url http://localhost:9601/workspaces/{ws_id}/config/sync \
--header 'Content-Type: application/json' \
--data '
{
"endpoints": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"request": {
"method": "POST",
"headers": null,
"timeout": 10000
},
"retry": {
"strategy": "fixed",
"config": {
"attempts": [
0,
60,
3600
]
}
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": true,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
],
"sources": [
{
"config": {
"http": {
"methods": [
"POST"
]
}
},
"id": "<string>",
"name": "<string>",
"enabled": true,
"type": "http",
"async": false,
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": true,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
]
}
'import requests
url = "http://localhost:9601/workspaces/{ws_id}/config/sync"
payload = {
"endpoints": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": True,
"request": {
"method": "POST",
"headers": None,
"timeout": 10000
},
"retry": {
"strategy": "fixed",
"config": { "attempts": [0, 60, 3600] }
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": True,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
],
"sources": [
{
"config": { "http": { "methods": ["POST"] } },
"id": "<string>",
"name": "<string>",
"enabled": True,
"type": "http",
"async": False,
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
},
"plugins": [
{
"id": "<string>",
"name": "<string>",
"enabled": True,
"endpoint_id": "<string>",
"source_id": "<string>",
"config": {},
"metadata": {}
}
]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
endpoints: [
{
id: '<string>',
name: '<string>',
description: '<string>',
enabled: true,
request: {method: 'POST', headers: null, timeout: 10000},
retry: {strategy: 'fixed', config: {attempts: [0, 60, 3600]}},
events: [],
metadata: {},
rate_limit: {quota: 1, period: 2},
plugins: [
{
id: '<string>',
name: '<string>',
enabled: true,
endpoint_id: '<string>',
source_id: '<string>',
config: {},
metadata: {}
}
]
}
],
sources: [
{
config: {http: {methods: ['POST']}},
id: '<string>',
name: '<string>',
enabled: true,
type: 'http',
async: false,
metadata: {},
rate_limit: {quota: 1, period: 2},
plugins: [
{
id: '<string>',
name: '<string>',
enabled: true,
endpoint_id: '<string>',
source_id: '<string>',
config: {},
metadata: {}
}
]
}
]
})
};
fetch('http://localhost:9601/workspaces/{ws_id}/config/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9601",
CURLOPT_URL => "http://localhost:9601/workspaces/{ws_id}/config/sync",
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([
'endpoints' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'request' => [
'method' => 'POST',
'headers' => null,
'timeout' => 10000
],
'retry' => [
'strategy' => 'fixed',
'config' => [
'attempts' => [
0,
60,
3600
]
]
],
'events' => [
],
'metadata' => [
],
'rate_limit' => [
'quota' => 1,
'period' => 2
],
'plugins' => [
[
'id' => '<string>',
'name' => '<string>',
'enabled' => true,
'endpoint_id' => '<string>',
'source_id' => '<string>',
'config' => [
],
'metadata' => [
]
]
]
]
],
'sources' => [
[
'config' => [
'http' => [
'methods' => [
'POST'
]
]
],
'id' => '<string>',
'name' => '<string>',
'enabled' => true,
'type' => 'http',
'async' => false,
'metadata' => [
],
'rate_limit' => [
'quota' => 1,
'period' => 2
],
'plugins' => [
[
'id' => '<string>',
'name' => '<string>',
'enabled' => true,
'endpoint_id' => '<string>',
'source_id' => '<string>',
'config' => [
],
'metadata' => [
]
]
]
]
]
]),
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 := "http://localhost:9601/workspaces/{ws_id}/config/sync"
payload := strings.NewReader("{\n \"endpoints\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"request\": {\n \"method\": \"POST\",\n \"headers\": null,\n \"timeout\": 10000\n },\n \"retry\": {\n \"strategy\": \"fixed\",\n \"config\": {\n \"attempts\": [\n 0,\n 60,\n 3600\n ]\n }\n },\n \"events\": [],\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ],\n \"sources\": [\n {\n \"config\": {\n \"http\": {\n \"methods\": [\n \"POST\"\n ]\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"type\": \"http\",\n \"async\": false,\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:9601/workspaces/{ws_id}/config/sync")
.header("Content-Type", "application/json")
.body("{\n \"endpoints\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"request\": {\n \"method\": \"POST\",\n \"headers\": null,\n \"timeout\": 10000\n },\n \"retry\": {\n \"strategy\": \"fixed\",\n \"config\": {\n \"attempts\": [\n 0,\n 60,\n 3600\n ]\n }\n },\n \"events\": [],\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ],\n \"sources\": [\n {\n \"config\": {\n \"http\": {\n \"methods\": [\n \"POST\"\n ]\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"type\": \"http\",\n \"async\": false,\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9601/workspaces/{ws_id}/config/sync")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoints\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"request\": {\n \"method\": \"POST\",\n \"headers\": null,\n \"timeout\": 10000\n },\n \"retry\": {\n \"strategy\": \"fixed\",\n \"config\": {\n \"attempts\": [\n 0,\n 60,\n 3600\n ]\n }\n },\n \"events\": [],\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ],\n \"sources\": [\n {\n \"config\": {\n \"http\": {\n \"methods\": [\n \"POST\"\n ]\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"type\": \"http\",\n \"async\": false,\n \"metadata\": {},\n \"rate_limit\": {\n \"quota\": 1,\n \"period\": 2\n },\n \"plugins\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"endpoint_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body⌘I