- π οΈ API Contracts
- Knowledge Base API reference
- Knowledge File API
Delete a file from knowledge base
const url = 'https://api.amitysolutions.com/api/v1/knowledge/1/files/1';const options = {method: 'DELETE', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.amitysolutions.com/api/v1/knowledge/1/files/1 \ --header 'x-api-key: <x-api-key>'Authorizations
Section titled βAuthorizationsβParameters
Section titled β Parameters βPath Parameters
Section titled βPath ParametersβKnowledge Base ID
Knowledge File ID
Responses
Section titled β Responses βProcessed Successfully.
Unauthorized Error. ASAP will return this error when there is either no api key, invalid api key or the client`s IP address is not whitelisted.
object
object
Example
{ "name": "UnauthorizedException", "code": 401001, "status": 401, "message": "Unauthorized", "errors": []}Not found error. Could be one of KnowledgeNotFoundError or KnowledgeFileNotFoundError
object
Name of the error
ASAP platform specific error code
HTTP status code
Error message details
object
object
Name of the error
ASAP platform specific error code
HTTP status code
Error message details
object
Example
{ "name": "NotFoundException", "code": 404001, "status": 404, "message": "Knowledge base with specified ID not found.", "errors": []}Validation Error
object
Name of the error
ASAP platform specific error code
HTTP status code
Error message details
object
Type of error
Name of the field having the error
Input value
Error message
Example
{ "name": "UnprocessableEntityException", "code": 422001, "status": 422, "message": "request payload validation failed", "errors": [ { "type": "isNotEmpty", "field": "name", "message": "name must not be empty" }, { "type": "min", "field": "limit", "value": -1, "message": "limit must not be less than 1" } ]}Too Many Requests
object
Name of the error
ASAP platform specific error code
HTTP status code
Error message details
object
Example
{ "name": "RateLimitExceededException", "code": 429001, "status": 429, "message": "Rate limit exceeded", "errors": []}Was this page helpful?
Thank you for your feedback!