Skip to main content
< All Topics
Print

6.2 API Reference

Use Impulse DW Restful APIs to access data available in the data warehouse. The following section provides the service, request and response specification.

OperationRequest ParametersResponseResponse
/v1/sql/resultRequest headerAuthorization: Token <your api token>
JSON formatted request body{“sql”:”Your SQL statement”,”start_index”: [optional],”end_index”:[optional],”row_limit”:[optional, default=100],”result_format”:[optional, supported formats: default=json, csv, html]}Query result in the format specified.Exceptions:{“result”:”No result fetched”,”exception”:<Exception message describing the reason>”}

Examples:

Example1: curl -X POST https://impulsedw.accure.ai/v1/sql/result -H ‘Authorization: Token 1234567890987654321’ -d ‘{“sql”:”select * from \”tablename\””}’

  • The above example will return 100  rows in JSON format

Example 2: curl -X POST https://impulsedw.accure.ai/v1/sql/result -H ‘Authorization: Token 1234567890987654321’ -d ‘{“sql”:”select * from \”tablename\”, “row_limit”:1000, “result_format”:”csv”}’

  • This will return 1000 rows in csv format

Example 3: curl -X POST https://impulsedw.accure.ai/v1/sql/result -H ‘Authorization: Token 1234567890987654321’ -d ‘{“sql”:”select * from \”tablename\”, “start_index”:100, “row_limit”:1000, “result_format”:”csv”}’

  • This will return 1000 rows with off set = 100, in csv format

Note: Your URL may be different from the URL used in this document. You will need to use the URL for your deployment.

Table of Contents