Skip to main content

Class: AIGatewayLogExportsClient

Defined in: src/ai-gateway/log-exports-client.ts:32

Workspace-scoped logExports operations on the SCM data plane.

Example​

`const client = new AIGatewayClient().logExports;`

Constructors​

Constructor​

new AIGatewayLogExportsClient(options): AIGatewayLogExportsClient;

Defined in: src/ai-gateway/log-exports-client.ts:33

Parameters​

ParameterType
optionsAIGatewaySubClientOptions

Returns​

AIGatewayLogExportsClient

Methods​

list()​

list(opts?): Promise<{
[key: string]: unknown;
object?: string;
total?: number;
data?: {
[key: string]: unknown;
id: string;
organisation_id: string;
filters: {
[key: string]: unknown;
time_of_generation_min?: string;
time_of_generation_max?: string;
total_units_min?: number;
total_units_max?: number;
cost_min?: number;
cost_max?: number;
ai_model?: string;
prompt_token_min?: number;
prompt_token_max?: number;
completion_token_min?: number;
completion_token_max?: number;
status_code?: string;
metadata?: {
[key: string]: unknown;
};
ai_org_model?: string;
weighted_feedback_min?: number;
weighted_feedback_max?: number;
virtual_keys?: string;
trace_id?: string | string[];
configs?: string;
workspace_slug?: string;
prompt_slug?: string;
page_size?: number;
current_page?: number;
};
requested_data: string[];
status: string;
description: string;
created_at: string;
last_updated_at: string;
created_by: string;
workspace_id: string;
object: string;
}[];
}>;

Defined in: src/ai-gateway/log-exports-client.ts:39

Get all logs exports. Verified on an isolated SCM fixture, 2026-09-06.

Parameters​

ParameterType
opts{ workspace_id?: string; }
opts.workspace_id?string

Returns​

Promise<{ [key: string]: unknown; object?: string; total?: number; data?: { [key: string]: unknown; id: string; organisation_id: string; filters: { [key: string]: unknown; time_of_generation_min?: string; time_of_generation_max?: string; total_units_min?: number; total_units_max?: number; cost_min?: number; cost_max?: number; ai_model?: string; prompt_token_min?: number; prompt_token_max?: number; completion_token_min?: number; completion_token_max?: number; status_code?: string; metadata?: { [key: string]: unknown; }; ai_org_model?: string; weighted_feedback_min?: number; weighted_feedback_max?: number; virtual_keys?: string; trace_id?: string | string[]; configs?: string; workspace_slug?: string; prompt_slug?: string; page_size?: number; current_page?: number; }; requested_data: string[]; status: string; description: string; created_at: string; last_updated_at: string; created_by: string; workspace_id: string; object: string; }[]; }>

Example​

`await gw.logExports.list({});`

create()​

create(body): Promise<{
[key: string]: unknown;
id: string;
total?: number;
object: string;
}>;

Defined in: src/ai-gateway/log-exports-client.ts:58

Create log export. Verified on an isolated SCM fixture, 2026-09-06.

Parameters​

ParameterType
body{ workspace_id?: string; filters: { time_of_generation_min: string; time_of_generation_max: string; total_units_min?: number; total_units_max?: number; cost_min?: number; cost_max?: number; ai_model?: string; prompt_token_min?: number; prompt_token_max?: number; completion_token_min?: number; completion_token_max?: number; status_code?: string; metadata?: { [key: string]: GatewayJsonValue; }; ai_org_model?: string; weighted_feedback_min?: number; weighted_feedback_max?: number; virtual_keys?: string; trace_id?: string; configs?: string; workspace_slug?: string; prompt_slug?: string; page_size?: number; current_page?: number; }; requested_data: string[]; description: string; }
body.workspace_id?string
body.filters{ time_of_generation_min: string; time_of_generation_max: string; total_units_min?: number; total_units_max?: number; cost_min?: number; cost_max?: number; ai_model?: string; prompt_token_min?: number; prompt_token_max?: number; completion_token_min?: number; completion_token_max?: number; status_code?: string; metadata?: { [key: string]: GatewayJsonValue; }; ai_org_model?: string; weighted_feedback_min?: number; weighted_feedback_max?: number; virtual_keys?: string; trace_id?: string; configs?: string; workspace_slug?: string; prompt_slug?: string; page_size?: number; current_page?: number; }
body.filters.time_of_generation_minstring
body.filters.time_of_generation_maxstring
body.filters.total_units_min?number
body.filters.total_units_max?number
body.filters.cost_min?number
body.filters.cost_max?number
body.filters.ai_model?string
body.filters.prompt_token_min?number
body.filters.prompt_token_max?number
body.filters.completion_token_min?number
body.filters.completion_token_max?number
body.filters.status_code?string
body.filters.metadata?{ [key: string]: GatewayJsonValue; }
body.filters.ai_org_model?string
body.filters.weighted_feedback_min?number
body.filters.weighted_feedback_max?number
body.filters.virtual_keys?string
body.filters.trace_id?string
body.filters.configs?string
body.filters.workspace_slug?string
body.filters.prompt_slug?string
body.filters.page_size?number
body.filters.current_page?number
body.requested_datastring[]
body.descriptionstring

Returns​

Promise<{ [key: string]: unknown; id: string; total?: number; object: string; }>

Example​

`await gw.logExports.create(body);`

get()​

get(exportId): Promise<{
[key: string]: unknown;
id: string;
organisation_id: string;
filters: {
[key: string]: unknown;
time_of_generation_min?: string;
time_of_generation_max?: string;
total_units_min?: number;
total_units_max?: number;
cost_min?: number;
cost_max?: number;
ai_model?: string;
prompt_token_min?: number;
prompt_token_max?: number;
completion_token_min?: number;
completion_token_max?: number;
status_code?: string;
metadata?: {
[key: string]: unknown;
};
ai_org_model?: string;
weighted_feedback_min?: number;
weighted_feedback_max?: number;
virtual_keys?: string;
trace_id?: string | string[];
configs?: string;
workspace_slug?: string;
prompt_slug?: string;
page_size?: number;
current_page?: number;
};
requested_data: string[];
status: string;
description: string;
created_at: string;
last_updated_at: string;
created_by: string;
workspace_id: string;
object: string;
}>;

Defined in: src/ai-gateway/log-exports-client.ts:78

Get a specific logs export. Verified on an isolated SCM fixture, 2026-09-06.

Parameters​

ParameterType
exportIdstring

Returns​

Promise<{ [key: string]: unknown; id: string; organisation_id: string; filters: { [key: string]: unknown; time_of_generation_min?: string; time_of_generation_max?: string; total_units_min?: number; total_units_max?: number; cost_min?: number; cost_max?: number; ai_model?: string; prompt_token_min?: number; prompt_token_max?: number; completion_token_min?: number; completion_token_max?: number; status_code?: string; metadata?: { [key: string]: unknown; }; ai_org_model?: string; weighted_feedback_min?: number; weighted_feedback_max?: number; virtual_keys?: string; trace_id?: string | string[]; configs?: string; workspace_slug?: string; prompt_slug?: string; page_size?: number; current_page?: number; }; requested_data: string[]; status: string; description: string; created_at: string; last_updated_at: string; created_by: string; workspace_id: string; object: string; }>

Example​

`await gw.logExports.get('resource-id');`

update()​

update(exportId, body): Promise<{
[key: string]: unknown;
id: string;
total?: number;
object: string;
}>;

Defined in: src/ai-gateway/log-exports-client.ts:95

Update a logs export. Verified on an isolated SCM fixture, 2026-09-06.

Parameters​

ParameterType
exportIdstring
body{ workspace_id?: string; filters: { time_of_generation_min: string; time_of_generation_max: string; total_units_min?: number; total_units_max?: number; cost_min?: number; cost_max?: number; ai_model?: string; prompt_token_min?: number; prompt_token_max?: number; completion_token_min?: number; completion_token_max?: number; status_code?: string; metadata?: { [key: string]: GatewayJsonValue; }; ai_org_model?: string; weighted_feedback_min?: number; weighted_feedback_max?: number; virtual_keys?: string; trace_id?: string; configs?: string; workspace_slug?: string; prompt_slug?: string; page_size?: number; current_page?: number; }; requested_data?: string[]; description: string; }
body.workspace_id?string
body.filters{ time_of_generation_min: string; time_of_generation_max: string; total_units_min?: number; total_units_max?: number; cost_min?: number; cost_max?: number; ai_model?: string; prompt_token_min?: number; prompt_token_max?: number; completion_token_min?: number; completion_token_max?: number; status_code?: string; metadata?: { [key: string]: GatewayJsonValue; }; ai_org_model?: string; weighted_feedback_min?: number; weighted_feedback_max?: number; virtual_keys?: string; trace_id?: string; configs?: string; workspace_slug?: string; prompt_slug?: string; page_size?: number; current_page?: number; }
body.filters.time_of_generation_minstring
body.filters.time_of_generation_maxstring
body.filters.total_units_min?number
body.filters.total_units_max?number
body.filters.cost_min?number
body.filters.cost_max?number
body.filters.ai_model?string
body.filters.prompt_token_min?number
body.filters.prompt_token_max?number
body.filters.completion_token_min?number
body.filters.completion_token_max?number
body.filters.status_code?string
body.filters.metadata?{ [key: string]: GatewayJsonValue; }
body.filters.ai_org_model?string
body.filters.weighted_feedback_min?number
body.filters.weighted_feedback_max?number
body.filters.virtual_keys?string
body.filters.trace_id?string
body.filters.configs?string
body.filters.workspace_slug?string
body.filters.prompt_slug?string
body.filters.page_size?number
body.filters.current_page?number
body.requested_data?string[]
body.descriptionstring

Returns​

Promise<{ [key: string]: unknown; id: string; total?: number; object: string; }>

Example​

`await gw.logExports.update('resource-id', body);`

start()​

start(exportId): Promise<{
[key: string]: unknown;
message: string;
object: string;
}>;

Defined in: src/ai-gateway/log-exports-client.ts:117

Experimental

Start log export. SCM returned HTTP 500 (AB04) for an isolated export; successful execution is unverified.

Parameters​

ParameterType
exportIdstring

Returns​

Promise<{ [key: string]: unknown; message: string; object: string; }>

Example​

`await gw.logExports.start('resource-id');`

cancel()​

cancel(exportId): Promise<{
[key: string]: unknown;
message: string;
object: string;
}>;

Defined in: src/ai-gateway/log-exports-client.ts:134

Experimental

Cancel log export. No running owned export was available; contract-tested only.

Parameters​

ParameterType
exportIdstring

Returns​

Promise<{ [key: string]: unknown; message: string; object: string; }>

Example​

`await gw.logExports.cancel('resource-id');`

download()​

download(exportId): Promise<{
[key: string]: unknown;
signed_url: string;
}>;

Defined in: src/ai-gateway/log-exports-client.ts:151

Experimental

Download log export. The owned export could not start; successful download is unverified.

Parameters​

ParameterType
exportIdstring

Returns​

Promise<{ [key: string]: unknown; signed_url: string; }>

Example​

`await gw.logExports.download('resource-id');`