curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/ingest/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "<string>",
"task_id": "<string>"
}
'import requests
url = "https://{space}.{region}.api.niadra.com/v1/ingest/status"
payload = {
"conversation_id": "<string>",
"task_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({conversation_id: '<string>', task_id: '<string>'})
};
fetch('https://{space}.{region}.api.niadra.com/v1/ingest/status', 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/ingest/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'conversation_id' => '<string>',
'task_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{space}.{region}.api.niadra.com/v1/ingest/status"
payload := strings.NewReader("{\n \"conversation_id\": \"<string>\",\n \"task_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://{space}.{region}.api.niadra.com/v1/ingest/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"<string>\",\n \"task_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/ingest/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conversation_id\": \"<string>\",\n \"task_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"state": "unknown",
"close_reason": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"extraction": "ok",
"last_event_at": "2023-11-07T05:31:56Z",
"masked": {}
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Estado de uma conversa
Se o que foi enviado para uma conversa ou tarefa já virou memória: open, processing, ready, failed ou unknown. Só estados, nunca conteúdo.
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/ingest/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "<string>",
"task_id": "<string>"
}
'import requests
url = "https://{space}.{region}.api.niadra.com/v1/ingest/status"
payload = {
"conversation_id": "<string>",
"task_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({conversation_id: '<string>', task_id: '<string>'})
};
fetch('https://{space}.{region}.api.niadra.com/v1/ingest/status', 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/ingest/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'conversation_id' => '<string>',
'task_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{space}.{region}.api.niadra.com/v1/ingest/status"
payload := strings.NewReader("{\n \"conversation_id\": \"<string>\",\n \"task_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://{space}.{region}.api.niadra.com/v1/ingest/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"<string>\",\n \"task_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/ingest/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conversation_id\": \"<string>\",\n \"task_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"state": "unknown",
"close_reason": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"extraction": "ok",
"last_event_at": "2023-11-07T05:31:56Z",
"masked": {}
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Autorizações
nia_sk_...
Corpo
Resposta
Resposta de sucesso.
Se o que foi enviado para uma conversa ou tarefa já virou memória. Sem conteúdo, só estados.
open: ainda recebe turnos; a memória vem depois que ela fecha por inatividade ou por conversation.ended. processing: fechada, extração na fila ou rodando. ready: extraída; a memória a aplica em segundos. failed: a extração falhou e um episódio-modelo fica no lugar; a passagem noturna extrai de novo. unknown: nada chegou com esse id.
unknown, open, processing, ready, failed A última extração da última sessão fechada, quando há uma.
ok, minimal, invalid, failed Valores retidos dos eventos desta conversa ou tarefa antes de serem gravados, por tipo (card, cvv, password, secret); ausente quando nenhum foi.
Show child attributes
Show child attributes

