Execute Connector
curl --request POST \
--url https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector} \
--header 'Content-Type: application/json' \
--data '
{
"resource": "get-users",
"action": "get",
"data": {
"path": {
"id": "123"
},
"query": {
"limit": 10
},
"body": {
"name": "John"
},
"headers": {
"X-Custom": "value"
}
},
"options": {
"useMock": false,
"timeout": 5000
}
}
'import requests
url = "https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}"
payload = {
"resource": "get-users",
"action": "get",
"data": {
"path": { "id": "123" },
"query": { "limit": 10 },
"body": { "name": "John" },
"headers": { "X-Custom": "value" }
},
"options": {
"useMock": False,
"timeout": 5000
}
}
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({
resource: 'get-users',
action: 'get',
data: {
path: {id: '123'},
query: {limit: 10},
body: JSON.stringify({name: 'John'}),
headers: {'X-Custom': 'value'}
},
options: {useMock: false, timeout: 5000}
})
};
fetch('https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}', 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.runflow.ai/api/v1/runtime/v1/connectors/{connector}",
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([
'resource' => 'get-users',
'action' => 'get',
'data' => [
'path' => [
'id' => '123'
],
'query' => [
'limit' => 10
],
'body' => [
'name' => 'John'
],
'headers' => [
'X-Custom' => 'value'
]
],
'options' => [
'useMock' => false,
'timeout' => 5000
]
]),
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.runflow.ai/api/v1/runtime/v1/connectors/{connector}"
payload := strings.NewReader("{\n \"resource\": \"get-users\",\n \"action\": \"get\",\n \"data\": {\n \"path\": {\n \"id\": \"123\"\n },\n \"query\": {\n \"limit\": 10\n },\n \"body\": {\n \"name\": \"John\"\n },\n \"headers\": {\n \"X-Custom\": \"value\"\n }\n },\n \"options\": {\n \"useMock\": false,\n \"timeout\": 5000\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("https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"get-users\",\n \"action\": \"get\",\n \"data\": {\n \"path\": {\n \"id\": \"123\"\n },\n \"query\": {\n \"limit\": 10\n },\n \"body\": {\n \"name\": \"John\"\n },\n \"headers\": {\n \"X-Custom\": \"value\"\n }\n },\n \"options\": {\n \"useMock\": false,\n \"timeout\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource\": \"get-users\",\n \"action\": \"get\",\n \"data\": {\n \"path\": {\n \"id\": \"123\"\n },\n \"query\": {\n \"limit\": 10\n },\n \"body\": {\n \"name\": \"John\"\n },\n \"headers\": {\n \"X-Custom\": \"value\"\n }\n },\n \"options\": {\n \"useMock\": false,\n \"timeout\": 5000\n }\n}"
response = http.request(request)
puts response.read_bodyRuntime API - Connectors
Execute Connector
Execute external API
POST
/
api
/
v1
/
runtime
/
v1
/
connectors
/
{connector}
Execute Connector
curl --request POST \
--url https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector} \
--header 'Content-Type: application/json' \
--data '
{
"resource": "get-users",
"action": "get",
"data": {
"path": {
"id": "123"
},
"query": {
"limit": 10
},
"body": {
"name": "John"
},
"headers": {
"X-Custom": "value"
}
},
"options": {
"useMock": false,
"timeout": 5000
}
}
'import requests
url = "https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}"
payload = {
"resource": "get-users",
"action": "get",
"data": {
"path": { "id": "123" },
"query": { "limit": 10 },
"body": { "name": "John" },
"headers": { "X-Custom": "value" }
},
"options": {
"useMock": False,
"timeout": 5000
}
}
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({
resource: 'get-users',
action: 'get',
data: {
path: {id: '123'},
query: {limit: 10},
body: JSON.stringify({name: 'John'}),
headers: {'X-Custom': 'value'}
},
options: {useMock: false, timeout: 5000}
})
};
fetch('https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}', 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.runflow.ai/api/v1/runtime/v1/connectors/{connector}",
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([
'resource' => 'get-users',
'action' => 'get',
'data' => [
'path' => [
'id' => '123'
],
'query' => [
'limit' => 10
],
'body' => [
'name' => 'John'
],
'headers' => [
'X-Custom' => 'value'
]
],
'options' => [
'useMock' => false,
'timeout' => 5000
]
]),
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.runflow.ai/api/v1/runtime/v1/connectors/{connector}"
payload := strings.NewReader("{\n \"resource\": \"get-users\",\n \"action\": \"get\",\n \"data\": {\n \"path\": {\n \"id\": \"123\"\n },\n \"query\": {\n \"limit\": 10\n },\n \"body\": {\n \"name\": \"John\"\n },\n \"headers\": {\n \"X-Custom\": \"value\"\n }\n },\n \"options\": {\n \"useMock\": false,\n \"timeout\": 5000\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("https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"get-users\",\n \"action\": \"get\",\n \"data\": {\n \"path\": {\n \"id\": \"123\"\n },\n \"query\": {\n \"limit\": 10\n },\n \"body\": {\n \"name\": \"John\"\n },\n \"headers\": {\n \"X-Custom\": \"value\"\n }\n },\n \"options\": {\n \"useMock\": false,\n \"timeout\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.ai/api/v1/runtime/v1/connectors/{connector}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource\": \"get-users\",\n \"action\": \"get\",\n \"data\": {\n \"path\": {\n \"id\": \"123\"\n },\n \"query\": {\n \"limit\": 10\n },\n \"body\": {\n \"name\": \"John\"\n },\n \"headers\": {\n \"X-Custom\": \"value\"\n }\n },\n \"options\": {\n \"useMock\": false,\n \"timeout\": 5000\n }\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
Connector slug or name
Query Parameters
staging | production. Falls back to instance default.
Body
application/json
Resource slug
Example:
"get-users"
Action to perform (deprecated, optional)
Example:
"get"
Request data - can be flat or structured format
Example:
{
"path": { "id": "123" },
"query": { "limit": 10 },
"body": { "name": "John" },
"headers": { "X-Custom": "value" }
}Execution options (mock, timeout, credentials, etc)
Example:
{ "useMock": false, "timeout": 5000 }Response
Connector response envelope: { success, data, metadata: { connector, resource, ... } } when successful. On error returns { success: false, error, fallback?: true }.
⌘I