Run read-only SQL on public views. Supply statements as SQL strings or [SQL, parameters…]. Use LIMIT for large results.
POST
/
query
cURL
curl --request POST \ --url http://127.0.0.1:{port}/query \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ "SELECT state, count(*) AS n FROM rollout GROUP BY state"]'
from harbor import Harbor
client = Harbor()
result = client.query_sql(["SELECT state, count(*) AS n FROM rollout GROUP BY state"])
print(result)
client.close()
curl --request POST \ --url http://127.0.0.1:{port}/query \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ "SELECT state, count(*) AS n FROM rollout GROUP BY state"]'
from harbor import Harbor
client = Harbor()
result = client.query_sql(["SELECT state, count(*) AS n FROM rollout GROUP BY state"])
print(result)
client.close()