Utility

Raw SQL query (SELECT only)

Execute a read-only SQL SELECT against the RiskModels database. Only SELECT statements are permitted; DML and DDL are rejected. Results capped at 10,000 rows. Billed as cli-query capability. Requires valid Bearer token with billing balance.

post/cli/query

Request

  • Base URL: https://riskmodels.app/api
  • URL: https://riskmodels.app/api/cli/query
  • Auth: HTTP bearer

Request body

sqlstring required

SELECT statement to execute. Multi-statement and DML/DDL are rejected.

limitinteger

Max rows to return if no LIMIT clause in sql (default 100, max 10000).

Example request

{
  "sql": "SELECT ticker, symbol FROM symbols LIMIT 10"
}

Response

Query results.

resultsobject[]
countinteger
sqlstring

Executed SQL (may have LIMIT appended).

Changes

No recorded changes to this operation across all 1 revision of this API.