curl --request POST \
--url https://api.snowleopard.ai/v1/instances/{instance_id}/retrieve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userQuery": "How many users signed up last month?"
}
'{
"__type__": "retrieveResponse",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": [
{
"__type__": "schemaData",
"schemaId": "<string>",
"schemaType": "PostgreSQL",
"query": "<string>",
"rows": [
{}
],
"querySummary": {
"technical_details": "<string>",
"non_technical_explanation": "<string>"
},
"rowMax": 123,
"isTrimmed": true,
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"responseStatus": "SUCCESS"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responseStatus": "<string>",
"description": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responseStatus": "<string>",
"description": "<string>"
}Endpoints
Retrieve
Execute a natural language query against your instance’s data sources and return the retrieved data.
POST
/
v1
/
instances
/
{instance_id}
/
retrieve
curl --request POST \
--url https://api.snowleopard.ai/v1/instances/{instance_id}/retrieve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userQuery": "How many users signed up last month?"
}
'{
"__type__": "retrieveResponse",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": [
{
"__type__": "schemaData",
"schemaId": "<string>",
"schemaType": "PostgreSQL",
"query": "<string>",
"rows": [
{}
],
"querySummary": {
"technical_details": "<string>",
"non_technical_explanation": "<string>"
},
"rowMax": 123,
"isTrimmed": true,
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"responseStatus": "SUCCESS"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responseStatus": "<string>",
"description": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responseStatus": "<string>",
"description": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <api_key>. API keys are created per instance in Snow Leopard Cloud.
Path Parameters
Unique identifier for the instance to query
Body
application/json
Natural language query to execute against your instance's data sources
Example:
"How many users signed up last month?"
Response
Successful query execution
Type discriminator
Available options:
retrieveResponse Unique identifier for this API call
Array of query results or errors
- schemaData
- errorSchemaData
Show child attributes
Show child attributes
Status of the API response
Available options:
SUCCESS, NOT_FOUND_IN_SCHEMA, UNKNOWN, INTERNAL_SERVER_ERROR, AUTHORIZATION_FAILED, LLM_ERROR, LLM_TOKEN_LIMIT_REACHED