Create a endpoint
curl --request POST \
--url http://localhost:9601/workspaces/{ws_id}/endpoints \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"retry": {
"strategy": "fixed",
"config": {
"attempts": [
0,
60,
3600
]
}
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
}
}
'import requests
url = "http://localhost:9601/workspaces/{ws_id}/endpoints"
payload = {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": True,
"retry": {
"strategy": "fixed",
"config": { "attempts": [0, 60, 3600] }
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
}
}
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({
id: '<string>',
name: '<string>',
description: '<string>',
enabled: true,
retry: {strategy: 'fixed', config: {attempts: [0, 60, 3600]}},
events: [],
metadata: {},
rate_limit: {quota: 1, period: 2}
})
};
fetch('http://localhost:9601/workspaces/{ws_id}/endpoints', 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}/endpoints",
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([
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'retry' => [
'strategy' => 'fixed',
'config' => [
'attempts' => [
0,
60,
3600
]
]
],
'events' => [
],
'metadata' => [
],
'rate_limit' => [
'quota' => 1,
'period' => 2
]
]),
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}/endpoints"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\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}")
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}/endpoints")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\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}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9601/workspaces/{ws_id}/endpoints")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\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}"
response = http.request(request)
puts response.read_body{
"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
},
"created_at": 123,
"updated_at": 123
}Endpoint
Create a endpoint
POST
/
workspaces
/
{ws_id}
/
endpoints
Create a endpoint
curl --request POST \
--url http://localhost:9601/workspaces/{ws_id}/endpoints \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"retry": {
"strategy": "fixed",
"config": {
"attempts": [
0,
60,
3600
]
}
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
}
}
'import requests
url = "http://localhost:9601/workspaces/{ws_id}/endpoints"
payload = {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": True,
"retry": {
"strategy": "fixed",
"config": { "attempts": [0, 60, 3600] }
},
"events": [],
"metadata": {},
"rate_limit": {
"quota": 1,
"period": 2
}
}
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({
id: '<string>',
name: '<string>',
description: '<string>',
enabled: true,
retry: {strategy: 'fixed', config: {attempts: [0, 60, 3600]}},
events: [],
metadata: {},
rate_limit: {quota: 1, period: 2}
})
};
fetch('http://localhost:9601/workspaces/{ws_id}/endpoints', 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}/endpoints",
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([
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'retry' => [
'strategy' => 'fixed',
'config' => [
'attempts' => [
0,
60,
3600
]
]
],
'events' => [
],
'metadata' => [
],
'rate_limit' => [
'quota' => 1,
'period' => 2
]
]),
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}/endpoints"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\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}")
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}/endpoints")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\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}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9601/workspaces/{ws_id}/endpoints")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\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}"
response = http.request(request)
puts response.read_body{
"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
},
"created_at": 123,
"updated_at": 123
}Path Parameters
The workspace id
Example:
"default"
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The rate limit that uses GCRA algorithm (a variant of the leaky bucket algorithm that supports bursts).
Show child attributes
Show child attributes
Response
201 - application/json
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The rate limit that uses GCRA algorithm (a variant of the leaky bucket algorithm that supports bursts).
Show child attributes
Show child attributes
⌘I