curl --request POST \
--url https://api.wondeya.com/v1/knowledge/claims \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"claim": {
"es": "<string>",
"en": "<string>"
},
"topics": [
"<array>"
],
"agentId": {}
}
'import requests
url = "https://api.wondeya.com/v1/knowledge/claims"
payload = {
"title": "<string>",
"claim": {
"es": "<string>",
"en": "<string>"
},
"topics": ["<array>"],
"agentId": {}
}
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({
title: '<string>',
claim: {es: '<string>', en: '<string>'},
topics: ['<array>'],
agentId: {}
})
};
fetch('https://api.wondeya.com/v1/knowledge/claims', 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.wondeya.com/v1/knowledge/claims",
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([
'title' => '<string>',
'claim' => [
'es' => '<string>',
'en' => '<string>'
],
'topics' => [
'<array>'
],
'agentId' => [
]
]),
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://api.wondeya.com/v1/knowledge/claims"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"claim\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\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://api.wondeya.com/v1/knowledge/claims")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"claim\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/knowledge/claims")
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 \"title\": \"<string>\",\n \"claim\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"kind": "<string>",
"title": "<string>",
"status": "<string>",
"lang": "<string>",
"translated": true,
"topics": [
"<string>"
],
"chunkCount": 123,
"tokenCount": 123,
"summary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"sourceLang": "<string>",
"fileName": "<string>",
"contentType": "<string>",
"byteSize": 123,
"url": "<string>",
"resolvedUrl": "<string>",
"lastFetchedAt": "2023-11-07T05:31:56Z",
"syncTtlMinutes": 123,
"nextSyncAt": "2023-11-07T05:31:56Z",
"claim": {
"es": "<string>",
"en": "<string>"
}
}Escribe una afirmación curada
Una afirmación es una declaración breve aprobada por el negocio, escrita a mano en ambos idiomas para que nunca se traduzca de forma automática. Guardarla la vuelve a indexar.
curl --request POST \
--url https://api.wondeya.com/v1/knowledge/claims \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"claim": {
"es": "<string>",
"en": "<string>"
},
"topics": [
"<array>"
],
"agentId": {}
}
'import requests
url = "https://api.wondeya.com/v1/knowledge/claims"
payload = {
"title": "<string>",
"claim": {
"es": "<string>",
"en": "<string>"
},
"topics": ["<array>"],
"agentId": {}
}
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({
title: '<string>',
claim: {es: '<string>', en: '<string>'},
topics: ['<array>'],
agentId: {}
})
};
fetch('https://api.wondeya.com/v1/knowledge/claims', 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.wondeya.com/v1/knowledge/claims",
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([
'title' => '<string>',
'claim' => [
'es' => '<string>',
'en' => '<string>'
],
'topics' => [
'<array>'
],
'agentId' => [
]
]),
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://api.wondeya.com/v1/knowledge/claims"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"claim\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\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://api.wondeya.com/v1/knowledge/claims")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"claim\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/knowledge/claims")
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 \"title\": \"<string>\",\n \"claim\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"kind": "<string>",
"title": "<string>",
"status": "<string>",
"lang": "<string>",
"translated": true,
"topics": [
"<string>"
],
"chunkCount": 123,
"tokenCount": 123,
"summary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"sourceLang": "<string>",
"fileName": "<string>",
"contentType": "<string>",
"byteSize": 123,
"url": "<string>",
"resolvedUrl": "<string>",
"lastFetchedAt": "2023-11-07T05:31:56Z",
"syncTtlMinutes": 123,
"nextSyncAt": "2023-11-07T05:31:56Z",
"claim": {
"es": "<string>",
"en": "<string>"
}
}Autorizaciones
Una clave de API del espacio de trabajo: wdy_live_… / wdy_test_…. Se crea en POST /workspaces/{tenantId}/keys y se muestra exactamente una vez.
Cuerpo
1 - 120Show child attributes
Show child attributes
Etiquetas de tema en minúsculas. Una lista vacía hace universal a la fuente.
12Al crear: el agente, o null/ausente para el pool del espacio de trabajo. Al editar: ausente lo deja donde está; null lo mueve al pool; un id lo mueve allí.
Respuesta
null = el pool del espacio de trabajo.
upload, url o claim.
pending, ready, failed, …
El idioma canónico del corpus de los fragmentos.
La ficha de índice: una línea en inglés que nombra lo que esto cubre.
Un código de error legible por máquina.
Show child attributes
Show child attributes