import requests
url = "https://api.diga.io/v1/knowledge/item/file"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"successful_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"extension": "file",
"status": "indexing",
"url": "<string>",
"tags": [],
"category": "<string>"
}
],
"failed_items": [
{
"name": "<string>",
"error": "<string>"
}
]
}Upload knowledge pdf files to the system. Send as multipart/form-data with one or more of:
import requests
url = "https://api.diga.io/v1/knowledge/item/file"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"successful_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"extension": "file",
"status": "indexing",
"url": "<string>",
"tags": [],
"category": "<string>"
}
],
"failed_items": [
{
"name": "<string>",
"error": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.