(ai.data)
- query - Perform query to get data from a table
Perform query to get data from a table
import { Kx } from "kx";
const kx = new Kx({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await kx.ai.data.query({
table: "<value>",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.CanonicalQuery | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.KdbAiQueryResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.Unauthorized | 401 | application/json |
errors.Forbidden | 403 | application/json |
errors.NotFound | 404 | application/json |
errors.TooManyRequests | 429 | application/json |
errors.InternalServerError | 500 | application/json |
errors.ServiceUnavailable | 503 | application/json |
errors.SDKError | 4xx-5xx | / |