cURL
curl --request POST \ --url https://api.lmnr.ai/v1/sql/query \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "query": "SELECT name, input_tokens FROM spans WHERE start_time > now() - interval '\''1 hour'\'' LIMIT 10" }'
{ "data": [ { "name": "workflow", "input_tokens": 0 }, { "name": "openai.chat", "input_tokens": 369 } ] }
{ "query": "SELECT * FROM spans where start_time > now() - interval '1 hour' LIMIT 10" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
SQL query executed successfully
The response is of type object.
object