curl --request POST \
--url https://api.eddy.engineer/v1/apps/{id}/fn/{name} \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {},
"rev": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/apps/{id}/fn/{name}"
payload = {
"inputs": {},
"rev": "<string>"
}
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({inputs: {}, rev: '<string>'})
};
fetch('https://api.eddy.engineer/v1/apps/{id}/fn/{name}', 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.eddy.engineer/v1/apps/{id}/fn/{name}",
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([
'inputs' => [
],
'rev' => '<string>'
]),
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.eddy.engineer/v1/apps/{id}/fn/{name}"
payload := strings.NewReader("{\n \"inputs\": {},\n \"rev\": \"<string>\"\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.eddy.engineer/v1/apps/{id}/fn/{name}")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {},\n \"rev\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/apps/{id}/fn/{name}")
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 \"inputs\": {},\n \"rev\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cached": true,
"inputs": {},
"outputs": {},
"result_keys": [
"<string>"
],
"run_key": "<string>",
"transcript": "<string>"
}Run an app function (AS10)
Runs one of an app’s Lab functions (the manifest’s functions) on a revision (rev) or the current draft, with typed inputs: the manifest’s defaults, then the request’s (inputs, by name); a value of another kind of quantity is refused, never converted; quantities are bound in SI. Inside, ss.call(op, body) reaches the engine as the caller — its scopes, audit and meter apply — and refuses an operation that is not deterministic or reaches outside the engine; ss.field(json, path) reads a reply. A run is keyed by BLAKE3(script ‖ canonical inputs ‖ engine build) and the same key is answered from the cache (cached). The reply carries the outputs (the script’s variables), every result key the script touched, and the transcript; a script error is 422 FN_ERROR with its line. AS15: the draft (no rev) is for editors (403 PROJECT_FORBIDDEN); an app’s token acts only for its own app and revision (403 SCOPE_DENIED).
curl --request POST \
--url https://api.eddy.engineer/v1/apps/{id}/fn/{name} \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {},
"rev": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/apps/{id}/fn/{name}"
payload = {
"inputs": {},
"rev": "<string>"
}
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({inputs: {}, rev: '<string>'})
};
fetch('https://api.eddy.engineer/v1/apps/{id}/fn/{name}', 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.eddy.engineer/v1/apps/{id}/fn/{name}",
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([
'inputs' => [
],
'rev' => '<string>'
]),
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.eddy.engineer/v1/apps/{id}/fn/{name}"
payload := strings.NewReader("{\n \"inputs\": {},\n \"rev\": \"<string>\"\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.eddy.engineer/v1/apps/{id}/fn/{name}")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {},\n \"rev\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/apps/{id}/fn/{name}")
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 \"inputs\": {},\n \"rev\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cached": true,
"inputs": {},
"outputs": {},
"result_keys": [
"<string>"
],
"run_key": "<string>",
"transcript": "<string>"
}