curl --request POST \
--url https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/', 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.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "table_cells",
"text": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"all_sequences": false,
"note": "<string>",
"note_surface": "table_cells",
"noted_at": "2023-11-07T05:31:56Z",
"notes": [
"<string>"
],
"repeats": 0,
"source_text": "<string>",
"step_key": "<string>",
"step_label": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Restore a learning version
Roll a learning back to one of its versions: a learning that still exists takes its words again; a deleted one comes back. Waiting drafts it reaches are written again. dry_run answers the learning as it would read and changes nothing. Only a signed-in person can, never an API key.
curl --request POST \
--url https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/', 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.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/agent-learnings/versions/{version_id}/restore/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "table_cells",
"text": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"all_sequences": false,
"note": "<string>",
"note_surface": "table_cells",
"noted_at": "2023-11-07T05:31:56Z",
"notes": [
"<string>"
],
"repeats": 0,
"source_text": "<string>",
"step_key": "<string>",
"step_label": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Query Parameters
Report what would happen, and change nothing.
Response
Successful Response
One learning: a one-line rule the agent follows on every output.
The release that wrote it, for a learning split from a long prompt (simplified) or carried over from old feedback (carried): undoing that event (POST /agent-learnings/thumbs-downs/{event_id}/revert/ with this id) is Put back the original prompt. Null for a learning a thumbs down taught.
Who taught it, or null for a release.
The latest thumbs down that wrote it, for Undo (POST /agent-learnings/thumbs-downs/{event_id}/revert/); null when none did or the learning was only read.
Where it was taught: the surface whose thumbs down added it, simplified when a long prompt was split into a goal and learnings, carried when old feedback was carried over.
table_cells, agent_preview, task, writing_preview, reply_draft, sent_message, hand_edit, simplified, carried, template, hand The rule, one line.
Whether every sequence's writer follows it, rather than one agent.
What the person said in the thumbs down that last wrote it (last_event_id), every note of a refined one joined, one per line; null when no thumbs down did, and once its feedback session closed: a saved, discarded or undone session keeps none of the person's notes.
Where the thumbs down that last wrote it (last_event_id) was given, which note and source_text come from; it can differ from source once a later thumbs down on another surface changed it. Null when no thumbs down did.
table_cells, agent_preview, task, writing_preview, reply_draft, sent_message, hand_edit, simplified, carried, template, hand When that thumbs down was given; null when no thumbs down wrote it.
The same notes one by one, oldest first, each whole: the thumbs down's own, then each further note in its session. Empty when no thumbs down wrote it, and once its feedback session closed.
How often a later Needs work asked for it again, as it stood, once saved; 0 when none did.
The message that thumbs down was given on, as it read then; null when none was kept (a table agent's, or a learning a release wrote).
The one step of the sequence it holds for, by the step's agent prompt slot; null when it holds for every message the agent writes.
That step as the sequence names it now, e.g. "Step 2 · Follow up"; null when it holds for every message, or the step is gone.
Was this page helpful?