Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 5.5 KB

README.md

File metadata and controls

56 lines (40 loc) · 5.5 KB

Data

(ai.data)

Available Operations

  • query - Perform query to get data from a table

query

Perform query to get data from a table

Example Usage

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();

Parameters

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.

Response

Promise<operations.KdbAiQueryResponse>

Errors

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 /