Saltar al contenido principal
PATCH
/
v1
/
knowledge
/
item
/
{id}
Update Knowledge Base
import requests

url = "https://api.diga.io/v1/knowledge/item/{id}"

payload = { "name": "<string>" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "created_date": "2023-11-07T05:31:56Z",
  "status": "indexing",
  "url": "<string>",
  "category": "file",
  "size_bytes": 123,
  "knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

id
string<uuid>
requerido

Cuerpo

application/json
name
string | null

Optional new name for the knowledge item

Respuesta

Successful Response

id
string<uuid>
requerido

Unique identifier for the knowledge item

name
string
requerido

Name of the knowledge item

created_date
string<date-time>
requerido

When the item was created

status
enum<string>
requerido

Current status of the knowledge item

Opciones disponibles:
indexing,
uploaded,
error
url
string
requerido

URL where the file is stored

category
string
predeterminado:file
Allowed value: "file"
size_bytes
integer | null

Size of the knowledge item content in bytes

knowledge_base_id
string<uuid> | null

ID of the knowledge base this item belongs to, if any