Platform API ClientClient group5 methodsEventsMethods
Events
Ingest and query tenant-scoped audit events that drive proofs, replay analysis, and runtime governance investigations.
Single and batch ingestionCursor pagination and filteringRun-level event counts
Events
events.create()
Curated exampleHTTP endpoint wrapperPOST /api/v1/eventsPOST /api/v1/events
Signature
create(event: AuditEventInput): Promise<CreateEventResponse>Parameters
| Name | Type | Flags |
|---|---|---|
| event | AuditEventInput | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const created = await client.events.create({
runId: "run_checkout_001",
eventType: "model.invoked",
actor: { type: "service", id: "recommendation-worker" },
resource: { type: "model", provider: "openai", model: "gpt-4o" },
action: "invoke",
timestamp: new Date().toISOString(),
metadata: {
requestId: "req_123",
promptTokens: 942,
completionTokens: 211,
},
});
console.log(created.eventId, created.runId);Response
{
"eventId": "evt_01JAZ3PYX6B4AB2MNQEDK1GZ9R",
"runId": "run_checkout_001"
}events.createBatch()
Generated exampleHTTP endpoint wrapperPOST /api/v1/events/batchPOST /api/v1/events/batch
Signature
createBatch(input: BatchEventInput): Promise<BatchEventResponse>Parameters
| Name | Type | Flags |
|---|---|---|
| input | BatchEventInput | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const input = {} as BatchEventInput;
// Fill the input payload fields before calling this method.
const response = await client.events.createBatch(input);
console.log(response);Response
// Response type
Promise<BatchEventResponse>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));events.list()
Generated exampleHTTP endpoint wrapperGET /api/v1/eventsGET /api/v1/events
Signature
list(params: ListEventsParams): Promise<ListEventsResponse>Parameters
| Name | Type | Flags |
|---|---|---|
| params | ListEventsParams | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const params = {} as ListEventsParams;
// Fill the params payload fields before calling this method.
const response = await client.events.list(params);
console.log(response);Response
// Response type
Promise<ListEventsResponse>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));events.get()
Generated exampleHTTP endpoint wrapperGET /api/v1/events/{eventId}GET /api/v1/events/{eventId}
Signature
get(eventId: string): Promise<EventRecord>Parameters
| Name | Type | Flags |
|---|---|---|
| eventId | string | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const eventId = "<eventId>";
const response = await client.events.get(eventId);
console.log(response);Response
// Response type
Promise<EventRecord>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));events.count()
Generated exampleHTTP endpoint wrapperGET /api/v1/events/countGET /api/v1/events/count
Signature
count(params?: EventCountParams): Promise<EventCountResponse>Parameters
| Name | Type | Flags |
|---|---|---|
| params | EventCountParams | optional |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const params = {} as EventCountParams;
// Fill the params payload fields before calling this method.
const response = await client.events.count(params);
console.log(response);Response
// Response type
Promise<EventCountResponse>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));