To list all files with their details available in the user's Library
GEThttps://api.knowbase.ai/api/v1/library
Headers
Name
Type
Description
[ {"id":"file_id","file_name":"example.txt","created_at":"2023-04-01","type":"text","status":"processed","errors": [],"summary":"This is a summary.","file_size":1024,"is_public":true }]
{"error":"string"}
Example usage
import requests# The URL for the library endpointurl ='https://api.knowbase.ai/api/v1/library'# Replace 'your_access_token_here' with the actual access token you received from the APIheaders ={'access-token':'your_access_token_here'}# Make the GET request to retrieve the library files detailsresponse = requests.get(url, headers=headers)# Check the responseif response.status_code ==200:print("Successfully retrieved the list of files.")print(response.json())# This will print the list of files with their detailselse:print("Failed to retrieve the list of files.")print(response.json())# This will print the error message