Get operation schema
curl --request GET \
--url https://dash.getopenrails.com/api/agent/schema/{operation}import requests
url = "https://dash.getopenrails.com/api/agent/schema/{operation}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://dash.getopenrails.com/api/agent/schema/{operation}', 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://dash.getopenrails.com/api/agent/schema/{operation}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dash.getopenrails.com/api/agent/schema/{operation}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dash.getopenrails.com/api/agent/schema/{operation}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.getopenrails.com/api/agent/schema/{operation}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"ok": true,
"operation": "checkout.preview",
"inputSchema": {},
"outputSchema": {}
}{
"ok": false,
"operation": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"suggestion": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}Reference
Get operation schema
Returns JSON Schema for an action or route operation. Agents should call this before constructing request payloads.
GET
/
api
/
agent
/
schema
/
{operation}
Get operation schema
curl --request GET \
--url https://dash.getopenrails.com/api/agent/schema/{operation}import requests
url = "https://dash.getopenrails.com/api/agent/schema/{operation}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://dash.getopenrails.com/api/agent/schema/{operation}', 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://dash.getopenrails.com/api/agent/schema/{operation}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dash.getopenrails.com/api/agent/schema/{operation}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dash.getopenrails.com/api/agent/schema/{operation}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.getopenrails.com/api/agent/schema/{operation}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"ok": true,
"operation": "checkout.preview",
"inputSchema": {},
"outputSchema": {}
}{
"ok": false,
"operation": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"suggestion": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}Path Parameters
Available options:
checkout.preview, checkout.create, fees.estimate, webhook.example, webhook.verify_sample, routes.list, capabilities Response
Input and output schema