curl --request POST \
--url https://api.effectiveai.app/api/v2/procedures/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"procedureId": "<string>",
"version": 4503599627370495,
"source": "<string>",
"sourceName": "<string>",
"fragments": {},
"documents": {},
"inputs": {},
"connections": {},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.effectiveai.app/api/v2/procedures/runs"
payload = {
"procedureId": "<string>",
"version": 4503599627370495,
"source": "<string>",
"sourceName": "<string>",
"fragments": {},
"documents": {},
"inputs": {},
"connections": {},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
procedureId: '<string>',
version: 4503599627370495,
source: '<string>',
sourceName: '<string>',
fragments: {},
documents: {},
inputs: {},
connections: {},
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.effectiveai.app/api/v2/procedures/runs', 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.effectiveai.app/api/v2/procedures/runs",
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([
'procedureId' => '<string>',
'version' => 4503599627370495,
'source' => '<string>',
'sourceName' => '<string>',
'fragments' => [
],
'documents' => [
],
'inputs' => [
],
'connections' => [
],
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.effectiveai.app/api/v2/procedures/runs"
payload := strings.NewReader("{\n \"procedureId\": \"<string>\",\n \"version\": 4503599627370495,\n \"source\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"fragments\": {},\n \"documents\": {},\n \"inputs\": {},\n \"connections\": {},\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.effectiveai.app/api/v2/procedures/runs")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"procedureId\": \"<string>\",\n \"version\": 4503599627370495,\n \"source\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"fragments\": {},\n \"documents\": {},\n \"inputs\": {},\n \"connections\": {},\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.effectiveai.app/api/v2/procedures/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"procedureId\": \"<string>\",\n \"version\": 4503599627370495,\n \"source\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"fragments\": {},\n \"documents\": {},\n \"inputs\": {},\n \"connections\": {},\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"outcome": "started",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"procedureId": "<string>",
"version": 4503599627370495,
"draft": true,
"title": "<string>",
"status": "<string>",
"visibility": "collaborative",
"projectId": "<string>",
"cause": {
"kind": "<string>",
"triggerId": "<string>",
"parentRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"startedBy": {
"userId": "<string>",
"name": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"webUrl": "<string>"
}
}{
"outcome": "started",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"procedureId": "<string>",
"version": 4503599627370495,
"draft": true,
"title": "<string>",
"status": "<string>",
"visibility": "collaborative",
"projectId": "<string>",
"cause": {
"kind": "<string>",
"triggerId": "<string>",
"parentRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"startedBy": {
"userId": "<string>",
"name": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"webUrl": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}Start a procedure run
Starts a run of a published procedure version with its inputs: live by default, or a version number. The run proceeds on its own; read it with getProcedureRun until its status is final, and answer the tasks it creates for people.
The inputs are checked against the version’s input schemas (getProcedureVersion) before the run starts; a mismatch is refused with 422 invalid_run_inputs, whose details say what to fix. Needs procedures:run on the procedure. Model and compute use is billed as the run consumes it; the call itself is not charged.
To try source before publishing it, send source (with sourceName, fragments and documents, as publishProcedure takes them) instead of procedureId. That starts a draft: the source is compiled and run against your real connections, but no version is stored; the run has draft: true and no version, and is private unless visibility says otherwise. A draft needs the right to publish the procedure its source names (build access, or procedures:create for a new one); scoped API keys cannot start drafts. Source that does not compile is refused with 422 invalid_procedure, whose details give each error as publishProcedure does. A draft cannot declare secrets. Triggers never start drafts, and nothing a draft stores can be published: to keep it, publish the source.
Idempotency-Key is required: a retry with the same key and request answers with the run that request started (outcome: already_started, 200); the same key with a different request is refused with 409 idempotency_conflict.
curl --request POST \
--url https://api.effectiveai.app/api/v2/procedures/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"procedureId": "<string>",
"version": 4503599627370495,
"source": "<string>",
"sourceName": "<string>",
"fragments": {},
"documents": {},
"inputs": {},
"connections": {},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.effectiveai.app/api/v2/procedures/runs"
payload = {
"procedureId": "<string>",
"version": 4503599627370495,
"source": "<string>",
"sourceName": "<string>",
"fragments": {},
"documents": {},
"inputs": {},
"connections": {},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
procedureId: '<string>',
version: 4503599627370495,
source: '<string>',
sourceName: '<string>',
fragments: {},
documents: {},
inputs: {},
connections: {},
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.effectiveai.app/api/v2/procedures/runs', 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.effectiveai.app/api/v2/procedures/runs",
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([
'procedureId' => '<string>',
'version' => 4503599627370495,
'source' => '<string>',
'sourceName' => '<string>',
'fragments' => [
],
'documents' => [
],
'inputs' => [
],
'connections' => [
],
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.effectiveai.app/api/v2/procedures/runs"
payload := strings.NewReader("{\n \"procedureId\": \"<string>\",\n \"version\": 4503599627370495,\n \"source\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"fragments\": {},\n \"documents\": {},\n \"inputs\": {},\n \"connections\": {},\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.effectiveai.app/api/v2/procedures/runs")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"procedureId\": \"<string>\",\n \"version\": 4503599627370495,\n \"source\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"fragments\": {},\n \"documents\": {},\n \"inputs\": {},\n \"connections\": {},\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.effectiveai.app/api/v2/procedures/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"procedureId\": \"<string>\",\n \"version\": 4503599627370495,\n \"source\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"fragments\": {},\n \"documents\": {},\n \"inputs\": {},\n \"connections\": {},\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"outcome": "started",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"procedureId": "<string>",
"version": 4503599627370495,
"draft": true,
"title": "<string>",
"status": "<string>",
"visibility": "collaborative",
"projectId": "<string>",
"cause": {
"kind": "<string>",
"triggerId": "<string>",
"parentRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"startedBy": {
"userId": "<string>",
"name": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"webUrl": "<string>"
}
}{
"outcome": "started",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"procedureId": "<string>",
"version": 4503599627370495,
"draft": true,
"title": "<string>",
"status": "<string>",
"visibility": "collaborative",
"projectId": "<string>",
"cause": {
"kind": "<string>",
"triggerId": "<string>",
"parentRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"startedBy": {
"userId": "<string>",
"name": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"webUrl": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"executionId": "<string>",
"accessUrl": "<string>"
}