listConfigs
List
Returns every configuration stored against a key, oldest first.
Endpoint
GET /keys/{key}/configs
See the API reference for this endpoint.
This operation needs a Management Key. Set it as userToken on the client, which sends it in the Authorization header. See setup.
Import
import { listConfigs } from "@addresszen/sdk";
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key | string | yes | API Key The API Key to retrieve. Begins ak_. |
Query Parameters
None.
Response Type
import type { ListConfigsResponse } from "@addresszen/sdk";
Errors
HTTP errors throw an ApiError with the HTTP status and the API error code and message. Network failures and aborts reject with the runtime's native error. Pass throwOnError: false to get { data, error } instead. See error handling.
Example
list-configs.tsts
import { createZenClient, listConfigs } from "@addresszen/sdk";
export const example = async () => {
const client = createZenClient({
apiKey: "ak_test",
userToken: "uk_example",
});
const { data } = await listConfigs({
client,
path: { key: "ak_test" },
});
return data;
};