Rename Evaluation Pipeline
curl --request PATCH \
--url https://api.promptlayer.com/reports/{report_id}/rename \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "Customer support - production blueprint",
"tags": [
"production",
"support"
]
}
'import requests
url = "https://api.promptlayer.com/reports/{report_id}/rename"
payload = {
"name": "Customer support - production blueprint",
"tags": ["production", "support"]
}
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({
name: 'Customer support - production blueprint',
tags: ['production', 'support']
})
};
fetch('https://api.promptlayer.com/reports/{report_id}/rename', 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/reports/{report_id}/rename",
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([
'name' => 'Customer support - production blueprint',
'tags' => [
'production',
'support'
]
]),
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/reports/{report_id}/rename"
payload := strings.NewReader("{\n \"name\": \"Customer support - production blueprint\",\n \"tags\": [\n \"production\",\n \"support\"\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/reports/{report_id}/rename")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer support - production blueprint\",\n \"tags\": [\n \"production\",\n \"support\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptlayer.com/reports/{report_id}/rename")
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 \"name\": \"Customer support - production blueprint\",\n \"tags\": [\n \"production\",\n \"support\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"report": {
"id": 456,
"name": "Customer support - production blueprint",
"tags": [
"production",
"support"
]
}
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Evaluations & Reports API
Rename Evaluation Pipeline
PATCH
/
reports
/
{report_id}
/
rename
Rename Evaluation Pipeline
curl --request PATCH \
--url https://api.promptlayer.com/reports/{report_id}/rename \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "Customer support - production blueprint",
"tags": [
"production",
"support"
]
}
'import requests
url = "https://api.promptlayer.com/reports/{report_id}/rename"
payload = {
"name": "Customer support - production blueprint",
"tags": ["production", "support"]
}
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({
name: 'Customer support - production blueprint',
tags: ['production', 'support']
})
};
fetch('https://api.promptlayer.com/reports/{report_id}/rename', 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/reports/{report_id}/rename",
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([
'name' => 'Customer support - production blueprint',
'tags' => [
'production',
'support'
]
]),
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/reports/{report_id}/rename"
payload := strings.NewReader("{\n \"name\": \"Customer support - production blueprint\",\n \"tags\": [\n \"production\",\n \"support\"\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/reports/{report_id}/rename")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer support - production blueprint\",\n \"tags\": [\n \"production\",\n \"support\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptlayer.com/reports/{report_id}/rename")
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 \"name\": \"Customer support - production blueprint\",\n \"tags\": [\n \"production\",\n \"support\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"report": {
"id": 456,
"name": "Customer support - production blueprint",
"tags": [
"production",
"support"
]
}
}{
"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.
name, tags, or both when you want to update pipeline metadata without recreating the pipeline.
Related
Authorizations
Path Parameters
ID of the evaluation pipeline to rename.
Body
application/json
Rename or retag payload.
Was this page helpful?
⌘I

