Executions
Execution statistics recording and retrieval. Track how often definitions are used.
2 methods
client.executions.record()
Record an execution of a definition. Idempotent — duplicate runIds return the existing count without incrementing.
Requires authentication
Parameters
typerequiredstringDefinition type.
agentcommandworkflowpipelinenamerequiredstringDefinition name.
versionrequiredstringDefinition version.
sourcerequiredstringExecution source (e.g., 'cli', 'api', 'ui').
runIdoptionalstringuuidIdempotency key (UUID recommended).
Return Fields
recordedrequiredbooleanWhether a new execution was recorded.
duplicaterequiredbooleanWhether this was a duplicate runId.
executionCountrequirednumberTotal execution count after recording.
Admin/system only. Execution recording is handled automatically by the platform.
record(type: DefinitionType, name: string, version: string, body: RecordExecutionBody): Promise<RecordExecutionResult>typescript
import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.executions.record('agent', 'my-project', '1.0.0', 'example-value');
console.log(result.recorded);Response Type
// Promise<RecordExecutionResult>
{
recorded: boolean;
duplicate: boolean;
executionCount: number;
}client.executions.getStats()
Get execution statistics for a definition within a time window.
Parameters
typerequiredstringDefinition type.
agentcommandworkflowpipelinenamerequiredstringDefinition name.
versionrequiredstringDefinition version.
windowoptionalnumberTime window in minutes (1–43200).
Default:60Return Fields
totalCountrequirednumberTotal executions (all time).
recentCountrequirednumberExecutions within the time window.
windowMinutesrequirednumberTime window used (in minutes).
getStats(type: DefinitionType, name: string, version: string, window?: number): Promise<ExecutionStats>typescript
import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.executions.getStats('agent', 'my-project', '1.0.0');
console.log(result.totalCount);Response Type
// Promise<ExecutionStats>
{
totalCount: number;
recentCount: number;
windowMinutes: number;
}