📔Interacting with app via API
Getting Started: Loading Data and Querying the API
Once your application is running, you can begin loading data and making queries through the API. Below is a step-by-step guide to help you through the process.
1. Ingest an Entry
To test data ingestion, send a POST
request to the /api/v1/ingest/your_schema
endpoint. Below is an example using curl
:
Note: This is a placeholder example. The request body must be adapted to match the structure required by your schema.
2. Query the System
After ingesting data, you can query the API by sending a POST
request to the /api/v1/search/query
endpoint. Example:
Note: Including the x-include-metadata: true
header will return additional debugging details, such as the search vector, weights, and evaluated NLQ outputs.
3. Load Data from Files
Check Available Data Loaders
To see which data loaders are available, send a request to the following endpoint:
Example Response (200 OK):
The keys in the response represent the available data loader names that can be used for subsequent requests. Refer to the documentation for details on how these names are defined and how they can be modified.
Initiate the Data Load
To start the data loading process, call the corresponding endpoint. This will create an asynchronous DataLoaderSource
task using the name defined in api.py
. Use curl
to trigger the process:
Example Response (202 Accepted):
If the provided name does not exist in the system, a 404 NOT FOUND
response will be returned. Logs can be checked for additional details regarding the execution of the task.
Last updated