Open a log
curl --request POST \
--url https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"releaseVersion": 1,
"role": "<string>"
}
'import requests
url = "https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}"
payload = {
"releaseVersion": 1,
"role": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({releaseVersion: 1, role: '<string>'})
};
fetch('https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}', 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.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}",
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([
'releaseVersion' => 1,
'role' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}"
payload := strings.NewReader("{\n \"releaseVersion\": 1,\n \"role\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"releaseVersion\": 1,\n \"role\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"releaseVersion\": 1,\n \"role\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"head": 123,
"entries": [
{
"seq": 123,
"at": "<string>",
"by": {
"role": "<string>",
"id": "<string>"
},
"event": {
"type": "opened"
}
}
],
"verdict": {
"stage": "Open",
"outcomes": {},
"declines": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"cite": "<unknown>"
}
],
"open": [
{
"question": "<string>",
"kind": "input",
"role": "<string>",
"choices": "<unknown>",
"because": "<string>",
"reads": [
{
"path": "<string>",
"value": "<unknown>"
}
]
}
],
"referrals": [
{
"name": "<string>",
"state": "Unknown",
"role": "<string>",
"because": "<string>",
"lapsed": true,
"reads": [
{
"path": "<string>",
"value": "<unknown>"
}
]
}
],
"invalid": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"cite": "<unknown>"
}
],
"quotes": [
{
"name": "<string>",
"outcomes": {},
"stands": true,
"bound": true,
"lapsed_by": [
"<string>"
]
}
],
"unrated": [
{
"name": "<string>",
"by": "<string>",
"code": "<string>",
"message": "<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>",
"refusal": {
"code": "<string>",
"message": "<string>",
"candidates": [
"<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>",
"refusal": {
"code": "<string>",
"message": "<string>",
"candidates": [
"<string>"
]
}
}Your programs
Open a log
Opens the log on a release of a program with a guideline entry: writes its Opened entry, pinned to that release, so every later entry is decided by it. A log is opened once; opening it again is refused (422, ALREADY_OPEN). A release whose entry is a rater has no log (409, wrong_component). The caller acts in a program role it holds.
POST
/
rsl
/
{id}
/
logs
/
{log}
Open a log
curl --request POST \
--url https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"releaseVersion": 1,
"role": "<string>"
}
'import requests
url = "https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}"
payload = {
"releaseVersion": 1,
"role": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({releaseVersion: 1, role: '<string>'})
};
fetch('https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}', 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.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}",
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([
'releaseVersion' => 1,
'role' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}"
payload := strings.NewReader("{\n \"releaseVersion\": 1,\n \"role\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"releaseVersion\": 1,\n \"role\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.canary.effectiveai.app/api/v2/rsl/{id}/logs/{log}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"releaseVersion\": 1,\n \"role\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"head": 123,
"entries": [
{
"seq": 123,
"at": "<string>",
"by": {
"role": "<string>",
"id": "<string>"
},
"event": {
"type": "opened"
}
}
],
"verdict": {
"stage": "Open",
"outcomes": {},
"declines": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"cite": "<unknown>"
}
],
"open": [
{
"question": "<string>",
"kind": "input",
"role": "<string>",
"choices": "<unknown>",
"because": "<string>",
"reads": [
{
"path": "<string>",
"value": "<unknown>"
}
]
}
],
"referrals": [
{
"name": "<string>",
"state": "Unknown",
"role": "<string>",
"because": "<string>",
"lapsed": true,
"reads": [
{
"path": "<string>",
"value": "<unknown>"
}
]
}
],
"invalid": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"cite": "<unknown>"
}
],
"quotes": [
{
"name": "<string>",
"outcomes": {},
"stands": true,
"bound": true,
"lapsed_by": [
"<string>"
]
}
],
"unrated": [
{
"name": "<string>",
"by": "<string>",
"code": "<string>",
"message": "<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>",
"refusal": {
"code": "<string>",
"message": "<string>",
"candidates": [
"<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>",
"refusal": {
"code": "<string>",
"message": "<string>",
"candidates": [
"<string>"
]
}
}Authorizations
Effective API key. Send Authorization: Bearer sk-eai-...
Path Parameters
Your organization’s ID for the program, chosen at its first upload: lowercase letters, digits, dots, underscores and hyphens. A rater’s program ID is its rater ID.
Required string length:
1 - 128Pattern:
^[a-z0-9][a-z0-9._-]{0,127}$The log’s id: a UUID the caller chooses when it opens the log, such as the id of the case the log decides. One id has one log.
Body
application/json