- ๐ ๏ธ API Contracts
- Knowledge Base API reference
- Knowledge Base API
const url = 'https://api.amitysolutions.com/api/v1/knowledge?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=25';const options = {method: 'GET', 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 GET \ --url 'https://api.amitysolutions.com/api/v1/knowledge?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=25' \ --header 'x-api-key: <x-api-key>'Authorizations
Section titled โAuthorizationsโParameters
Section titled โ Parameters โQuery Parameters
Section titled โQuery ParametersโPage number of the query
Number of items to include in each page
Responses
Section titled โ Responses โA list of knowledge bases and pagination metadata
object
object
Numeric ID of the knowledge
The name of the knowledge
Type of knowledge base. internal will search the content from uploaded files and external will send a request to target endpoint for search.
List of supported languages for the knowledge. Files uploaded to this knowledge will have a copy of the document with each supported language translated.
Search endpoint for external knowledge bases
If set to true, search will use semantic search on top of full-text search.
Timestamp of creation for knowledge
Last updated timestamp for knowledge
Total number of items that can be found with current filters
object
Current page
Total number of pages available with current filters
Number of items included in each page
Example
{ "data": [ { "source": "internal", "supportedLanguages": [ "en" ], "createdAt": "2023-11-09T00:00:00.000Z", "updatedAt": "2023-11-09T00:00:00.000Z" } ]}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": []}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!