connector.functions.test(side, request): runs the saved function or a draft; records and publishes nothing; an outbound test delivers for real
curl --request POST \
--url https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deliveryId": "<string>",
"replay": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deliveryId: '<string>', replay: true})
};
fetch('https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test"
payload = {
"deliveryId": "<string>",
"replay": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test"
payload := strings.NewReader("{\n \"deliveryId\": \"<string>\",\n \"replay\": true\n}")
req, _ := http.NewRequest("POST", 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))
}{
"side": "inbound",
"version": 123,
"result": "accept",
"answer": 123,
"dedupeKey": "<string>",
"routes": [
{
"agent": "<string>",
"sessionKey": "<string>",
"message": "<string>",
"replyTo": "<string>",
"matchOnly": true,
"replyKey": "<string>",
"settings": {
"cwd": "<string>",
"systemPrompt": "<string>",
"metadata": {}
}
}
],
"response": {
"status": 249,
"headers": {},
"body": "<string>"
},
"externalId": "<string>",
"retryAfter": 123,
"code": "<string>",
"reason": "<string>",
"error": "<string>",
"durationMs": 1,
"logs": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Connectors
connector.functions.test(side, request): runs the saved function or a draft; records and publishes nothing; an outbound test delivers for real
POST
/
connectors
/
{idOrName}
/
functions
/
{side}
/
test
connector.functions.test(side, request): runs the saved function or a draft; records and publishes nothing; an outbound test delivers for real
curl --request POST \
--url https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deliveryId": "<string>",
"replay": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deliveryId: '<string>', replay: true})
};
fetch('https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test"
payload = {
"deliveryId": "<string>",
"replay": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paddock.build/v1/connectors/{idOrName}/functions/{side}/test"
payload := strings.NewReader("{\n \"deliveryId\": \"<string>\",\n \"replay\": true\n}")
req, _ := http.NewRequest("POST", 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))
}{
"side": "inbound",
"version": 123,
"result": "accept",
"answer": 123,
"dedupeKey": "<string>",
"routes": [
{
"agent": "<string>",
"sessionKey": "<string>",
"message": "<string>",
"replyTo": "<string>",
"matchOnly": true,
"replyKey": "<string>",
"settings": {
"cwd": "<string>",
"systemPrompt": "<string>",
"metadata": {}
}
}
],
"response": {
"status": 249,
"headers": {},
"body": "<string>"
},
"externalId": "<string>",
"retryAfter": 123,
"code": "<string>",
"reason": "<string>",
"error": "<string>",
"durationMs": 1,
"logs": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Path Parameters
Body
application/json
Inbound: a sample request, or a recorded delivery's request; outbound: a message delivered for real. With a draft, the draft runs instead of the saved version.
Response
The result