Rejeitar uma proposta
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject', 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://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject"
req, _ := http.NewRequest("POST", 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.post("https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"kind": "procedure",
"origin": "distilled",
"proposal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "drafting",
"title": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by": "<string>",
"evidence": {
"conversation_id": "<string>",
"task_id": "<string>"
},
"note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"problem": "<string>",
"tags": [
"<string>"
],
"visibility": "source"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Memória do agente
Rejeitar uma proposta
A proposta fica rejeitada e nenhuma nota é criada. Só administradores.
POST
/
v1
/
agent-memory
/
proposals
/
{proposal_id}
/
reject
Rejeitar uma proposta
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject', 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://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject"
req, _ := http.NewRequest("POST", 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.post("https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/agent-memory/proposals/{proposal_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"kind": "procedure",
"origin": "distilled",
"proposal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "drafting",
"title": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by": "<string>",
"evidence": {
"conversation_id": "<string>",
"task_id": "<string>"
},
"note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"problem": "<string>",
"tags": [
"<string>"
],
"visibility": "source"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Autorizações
sourceKeypersonToken
nia_sk_...
Parâmetros de caminho
Resposta
A proposta rejeitada.
Opções disponíveis:
procedure, tool_note, process_note, pitfall distilled quando veio de uma conversa ou tarefa; agent quando o espaço segura as escritas dos agentes para uma pessoa aprovar.
Opções disponíveis:
distilled, agent Opções disponíveis:
drafting, pending, approved, rejected, failed De onde a nota veio: só o id, nunca o texto da conversa ou da tarefa.
Show child attributes
Show child attributes
A nota que uma aprovação criou.
Por que uma destilação falhou: nothing_to_propose, personal_data, no_turns ou unconfirmed_link (a conversa falou só por um vínculo que uma afirmação fez e ninguém confirmou ainda; peça de novo depois da confirmação).
Opções disponíveis:
source, vendor, space 
