Replace a knowledge base item file
Replaces an item's file in place and re-ingests it, keeping the same item ID. The new file is supplied in the file form field. The item is reprocessed asynchronously.
Authorization
personalAccessToken Personal Access Token of a Dynamiq user — the only credential accepted by the management API (api.*). Prefix dyn_pat_ (legacy uak_ tokens still authenticate). Send as Authorization: Bearer <token>.
In: header
Path Parameters
Knowledge base item UUID.
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/knowledgebase-items/497f6eca-6276-4993-bfeb-53cbbbba6f08/upload" \ -F file="string"{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"knowledgebase_id": "6f950f69-320f-4b35-bbd4-0a7c1c91d2a1",
"status": "pending",
"uploaded_at": "2019-08-24T14:15:22Z",
"name": "string",
"metadata": {},
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81",
"source_item_id": "ecd67d68-17cf-49d7-bd46-c75899862e20",
"trace_id": "df570c03-5a03-4cea-8df0-c162d05127ac",
"task_id": "736fde4d-9029-4915-8189-01353d6982cb",
"source": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"knowledgebase_id": "6f950f69-320f-4b35-bbd4-0a7c1c91d2a1",
"name": "string",
"description": "string",
"connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",
"provider": "google_drive",
"status": "active",
"config": {},
"latest_sync_id": "20fba974-7acd-480e-bb67-4e62961cb88e",
"latest_sync": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81",
"status": "running",
"started_at": "2019-08-24T14:15:22Z",
"ended_at": "2019-08-24T14:15:22Z",
"error": null
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"first_name": "string",
"last_name": "string",
"avatar_url": "string"
},
"updated_by": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"first_name": "string",
"last_name": "string",
"avatar_url": "string"
}
},
"source_item": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"type": "file",
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81",
"source_sync_id": "54cd5011-4443-47bf-8b57-a64fcea34e39",
"metadata": {},
"source": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"provider": "google_drive",
"status": "active"
}
}
}
}{
"error": {
"code": "bad_request",
"message": "Bad Request",
"details": {
"input": "cannot be blank"
}
}
}{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"code": "not_found",
"message": "Not Found"
}
}Reprocess a knowledge base item
Re-runs ingestion for a single knowledge base item. The item is reprocessed asynchronously; poll the item endpoint for status.
Download a knowledge base item file
Downloads the original file backing a knowledge base item as a binary attachment (`Content-Disposition: attachment; filename="<item-name>"`).