Criar Base de Conhecimento
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/knowledge/ \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"unityId": "<string>"
}
'import requests
url = "https://chat.api.toolzz.com.br/api/v1/knowledge/"
payload = {
"name": "<string>",
"description": "<string>",
"unityId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', unityId: '<string>'})
};
fetch('https://chat.api.toolzz.com.br/api/v1/knowledge/', 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://chat.api.toolzz.com.br/api/v1/knowledge/",
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([
'name' => '<string>',
'description' => '<string>',
'unityId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://chat.api.toolzz.com.br/api/v1/knowledge/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"unityId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://chat.api.toolzz.com.br/api/v1/knowledge/")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"unityId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.api.toolzz.com.br/api/v1/knowledge/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"unityId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"documentCount": 123,
"wordCount": 123,
"icon": "<string>",
"status": 123,
"isActivated": true
}Base de Conhecimento
Criar Base de Conhecimento
Endpoint para criar uma Base de Conhecimento
POST
/
api
/
v1
/
knowledge
/
Criar Base de Conhecimento
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/knowledge/ \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"unityId": "<string>"
}
'import requests
url = "https://chat.api.toolzz.com.br/api/v1/knowledge/"
payload = {
"name": "<string>",
"description": "<string>",
"unityId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', unityId: '<string>'})
};
fetch('https://chat.api.toolzz.com.br/api/v1/knowledge/', 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://chat.api.toolzz.com.br/api/v1/knowledge/",
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([
'name' => '<string>',
'description' => '<string>',
'unityId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://chat.api.toolzz.com.br/api/v1/knowledge/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"unityId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://chat.api.toolzz.com.br/api/v1/knowledge/")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"unityId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.api.toolzz.com.br/api/v1/knowledge/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"unityId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"documentCount": 123,
"wordCount": 123,
"icon": "<string>",
"status": 123,
"isActivated": true
}Token de Acesso
string
Token de acesso (“Bearer” deve estar antes do token)
Descrição do Body
string
required
Nome da Base de Conhecimento
string
required
Descrição da Base de Conhecimento
string
required
ID da unidade
Descrição da Resposta
Abaixo você verá a descrição da resposta da Base de Conhecimentouuid
required
Identificador único da Base de Conhecimento.
string
required
Título da Base de Conhecimento.
string
Descrição da Base de Conhecimento.
number
required
Número de documentos na Base de Conhecimento.
number
required
Total de palavras em todos os documentos da Base de Conhecimento.
string
URL do ícone da Base de Conhecimento.
number
required
Status da Base de Conhecimento (ex: 1 para ativa).
boolean
required
Indica se a Base de Conhecimento está ativada.

