curl --request GET \
--url https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source', 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.veryfront.com/projects/{project_reference}/evals/{eval_id}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"kind": "eval-source-document",
"id": "<string>",
"name": "<string>",
"targetKind": "agent",
"target": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"dataset": {
"kind": "inline",
"editable": true,
"dynamic": true,
"path": "<string>",
"examples": [
{
"id": "<string>",
"input": "<unknown>",
"reference": "<unknown>",
"metadata": {}
}
]
},
"metrics": [
{
"name": "<string>",
"family": "answer",
"severity": "gate",
"editable": true,
"dynamic": true,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
],
"repetitions": 123,
"tags": [
"<string>"
],
"metadata": {},
"editableFields": [
"name"
],
"dynamicFields": [
"name"
],
"capabilities": [
"project.evals.read"
],
"target_kind": "agent",
"source_path": "<string>",
"export_name": "<string>",
"editable_fields": [
"name"
],
"dynamic_fields": [
"name"
],
"description": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
]
}{
"type": "https://api.veryfront.com/errors/validation-failed",
"title": "Validation Failed",
"status": 400,
"cause": "schedule_concurrency_forbidden",
"idempotency": {
"state": "in_progress",
"operation": "<string>",
"retryable": true,
"retry_after_seconds": 1,
"expires_at": "<string>",
"recovery": {
"available": true,
"description": "<string>",
"resource_url": "<string>"
}
},
"code": "RUN_INVALID_INPUT",
"detail": "The 'email' field must be a valid email address",
"instance": "/projects/my-project/members",
"slug": "validation-failed",
"category": "VALIDATION",
"suggestion": "Check the request body and query parameters against the API documentation.",
"errors": [
{
"field": "email",
"message": "Invalid email format",
"code": "INVALID_FORMAT"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}Read eval source
Read the editable source behind one eval before changing it; returns the eval source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.evals.read.
curl --request GET \
--url https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source', 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.veryfront.com/projects/{project_reference}/evals/{eval_id}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"kind": "eval-source-document",
"id": "<string>",
"name": "<string>",
"targetKind": "agent",
"target": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"dataset": {
"kind": "inline",
"editable": true,
"dynamic": true,
"path": "<string>",
"examples": [
{
"id": "<string>",
"input": "<unknown>",
"reference": "<unknown>",
"metadata": {}
}
]
},
"metrics": [
{
"name": "<string>",
"family": "answer",
"severity": "gate",
"editable": true,
"dynamic": true,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
],
"repetitions": 123,
"tags": [
"<string>"
],
"metadata": {},
"editableFields": [
"name"
],
"dynamicFields": [
"name"
],
"capabilities": [
"project.evals.read"
],
"target_kind": "agent",
"source_path": "<string>",
"export_name": "<string>",
"editable_fields": [
"name"
],
"dynamic_fields": [
"name"
],
"description": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
]
}{
"type": "https://api.veryfront.com/errors/validation-failed",
"title": "Validation Failed",
"status": 400,
"cause": "schedule_concurrency_forbidden",
"idempotency": {
"state": "in_progress",
"operation": "<string>",
"retryable": true,
"retry_after_seconds": 1,
"expires_at": "<string>",
"recovery": {
"available": true,
"description": "<string>",
"resource_url": "<string>"
}
},
"code": "RUN_INVALID_INPUT",
"detail": "The 'email' field must be a valid email address",
"instance": "/projects/my-project/members",
"slug": "validation-failed",
"category": "VALIDATION",
"suggestion": "Check the request body and query parameters against the API documentation.",
"errors": [
{
"field": "email",
"message": "Invalid email format",
"code": "INVALID_FORMAT"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"edit_mode": "structured",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}Authorizations
Use a JWT bearer token or a Veryfront API key in the Authorization header.
Path Parameters
Project slug, UUID, or domain that identifies the project.
1Query Parameters
main_branch, environment, preview_branch, null project, main_branch, environment, preview_branch Response
Eval source document
eval-source-document Deprecated: use target_kind.
agent Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Deprecated: use editable_fields.
name, description, target, dataset, repetitions, tags, metadata, metrics, check Deprecated: use dynamic_fields.
name, description, target, dataset, repetitions, tags, metadata, metrics, check project.evals.read, project.evals.write, project.evals.run The same value as targetKind.
agent The same value as source.filePath.
The same value as source.exportName.
The same value as editableFields.
name, description, target, dataset, repetitions, tags, metadata, metrics, check The same value as dynamicFields.
name, description, target, dataset, repetitions, tags, metadata, metrics, check Editing mode of the eval. Returned with a source document, not in the list.
structured, source_only Why the eval can only be edited as source. Returned with a source document, not in the list.