Edit Evaluation Pipeline Column
curl --request PATCH \
--url https://api.promptlayer.com/report-columns/{report_column_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"report_id": 456,
"column_type": "CODE_EXECUTION",
"name": "Strict JSON check",
"configuration": {
"code": "import json\ntry:\n json.loads(response)\n return True\nexcept Exception:\n return False",
"language": "PYTHON"
}
}
'import requests
url = "https://api.promptlayer.com/report-columns/{report_column_id}"
payload = {
"report_id": 456,
"column_type": "CODE_EXECUTION",
"name": "Strict JSON check",
"configuration": {
"code": "import json
try:
json.loads(response)
return True
except Exception:
return False",
"language": "PYTHON"
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
report_id: 456,
column_type: 'CODE_EXECUTION',
name: 'Strict JSON check',
configuration: {
code: 'import json\ntry:\n json.loads(response)\n return True\nexcept Exception:\n return False',
language: 'PYTHON'
}
})
};
fetch('https://api.promptlayer.com/report-columns/{report_column_id}', 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.promptlayer.com/report-columns/{report_column_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'report_id' => 456,
'column_type' => 'CODE_EXECUTION',
'name' => 'Strict JSON check',
'configuration' => [
'code' => 'import json
try:
json.loads(response)
return True
except Exception:
return False',
'language' => 'PYTHON'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-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.promptlayer.com/report-columns/{report_column_id}"
payload := strings.NewReader("{\n \"report_id\": 456,\n \"column_type\": \"CODE_EXECUTION\",\n \"name\": \"Strict JSON check\",\n \"configuration\": {\n \"code\": \"import json\\ntry:\\n json.loads(response)\\n return True\\nexcept Exception:\\n return False\",\n \"language\": \"PYTHON\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://api.promptlayer.com/report-columns/{report_column_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"report_id\": 456,\n \"column_type\": \"CODE_EXECUTION\",\n \"name\": \"Strict JSON check\",\n \"configuration\": {\n \"code\": \"import json\\ntry:\\n json.loads(response)\\n return True\\nexcept Exception:\\n return False\",\n \"language\": \"PYTHON\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptlayer.com/report-columns/{report_column_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_id\": 456,\n \"column_type\": \"CODE_EXECUTION\",\n \"name\": \"Strict JSON check\",\n \"configuration\": {\n \"code\": \"import json\\ntry:\\n json.loads(response)\\n return True\\nexcept Exception:\\n return False\",\n \"language\": \"PYTHON\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"report_column": {
"id": 789,
"name": "Strict JSON check",
"column_type": "CODE_EXECUTION",
"position": 3,
"configuration": {
"language": "PYTHON"
}
}
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Evaluations & Reports API
Edit Evaluation Pipeline Column
PATCH
/
report-columns
/
{report_column_id}
Edit Evaluation Pipeline Column
curl --request PATCH \
--url https://api.promptlayer.com/report-columns/{report_column_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"report_id": 456,
"column_type": "CODE_EXECUTION",
"name": "Strict JSON check",
"configuration": {
"code": "import json\ntry:\n json.loads(response)\n return True\nexcept Exception:\n return False",
"language": "PYTHON"
}
}
'import requests
url = "https://api.promptlayer.com/report-columns/{report_column_id}"
payload = {
"report_id": 456,
"column_type": "CODE_EXECUTION",
"name": "Strict JSON check",
"configuration": {
"code": "import json
try:
json.loads(response)
return True
except Exception:
return False",
"language": "PYTHON"
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
report_id: 456,
column_type: 'CODE_EXECUTION',
name: 'Strict JSON check',
configuration: {
code: 'import json\ntry:\n json.loads(response)\n return True\nexcept Exception:\n return False',
language: 'PYTHON'
}
})
};
fetch('https://api.promptlayer.com/report-columns/{report_column_id}', 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.promptlayer.com/report-columns/{report_column_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'report_id' => 456,
'column_type' => 'CODE_EXECUTION',
'name' => 'Strict JSON check',
'configuration' => [
'code' => 'import json
try:
json.loads(response)
return True
except Exception:
return False',
'language' => 'PYTHON'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-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.promptlayer.com/report-columns/{report_column_id}"
payload := strings.NewReader("{\n \"report_id\": 456,\n \"column_type\": \"CODE_EXECUTION\",\n \"name\": \"Strict JSON check\",\n \"configuration\": {\n \"code\": \"import json\\ntry:\\n json.loads(response)\\n return True\\nexcept Exception:\\n return False\",\n \"language\": \"PYTHON\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://api.promptlayer.com/report-columns/{report_column_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"report_id\": 456,\n \"column_type\": \"CODE_EXECUTION\",\n \"name\": \"Strict JSON check\",\n \"configuration\": {\n \"code\": \"import json\\ntry:\\n json.loads(response)\\n return True\\nexcept Exception:\\n return False\",\n \"language\": \"PYTHON\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptlayer.com/report-columns/{report_column_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_id\": 456,\n \"column_type\": \"CODE_EXECUTION\",\n \"name\": \"Strict JSON check\",\n \"configuration\": {\n \"code\": \"import json\\ntry:\\n json.loads(response)\\n return True\\nexcept Exception:\\n return False\",\n \"language\": \"PYTHON\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"report_column": {
"id": 789,
"name": "Strict JSON check",
"column_type": "CODE_EXECUTION",
"position": 3,
"configuration": {
"language": "PYTHON"
}
}
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Legacy Dataset, Evaluation, and Report endpoints are deprecated for new workflows. Use the Tables API for new dataset import, evaluation, scoring, recalculation, and reporting workflows.
Behavior Notes
- Dataset columns are protected and cannot be edited.
- Only blueprint pipeline columns can be edited; columns on finished batch runs cannot.
- Column names must remain unique within the pipeline.
- Editing a column re-queues cells in that column and any columns to its right.
Related
Authorizations
Path Parameters
ID of the report column to edit.
Body
application/json
Column update payload.
Parent evaluation pipeline ID. Must match the column parent.
Replacement column type. DATASET columns cannot be edited.
Available options:
PROMPT_TEMPLATE, CODE_EXECUTION, ENDPOINT, WORKFLOW, MCP, HUMAN, CONVERSATION_SIMULATOR, LLM_ASSERTION, AI_DATA_EXTRACTION, COMPARE, CONTAINS, REGEX, COSINE_SIMILARITY, ABSOLUTE_NUMERIC_DISTANCE, JSON_PATH, XML_PATH, REGEX_EXTRACTION, PARSE_VALUE, VARIABLE, ASSERT_VALID, COALESCE, COMBINE_COLUMNS, COUNT, MATH_OPERATOR, MIN_MAX Replacement column configuration. Schema depends on column_type.
New column name. Must be unique within the pipeline.
New 1-based position. Cannot overwrite dataset columns.
Required range:
x >= 1Was this page helpful?

