Configuration¶
baseUrl and apiKey are required.
const client = new OkatanaClient({
baseUrl: 'https://okatana.internal.example',
apiKey: 'oka_public.secret',
});
URL normalization¶
The SDK accepts a deployment origin:
and normalizes it to:
It also accepts a deployment subpath:
which becomes:
If the supplied URL already ends in /api/v1, the SDK does not append it again.
There is no fallback host. An empty or invalid URL raises ConfigurationError before any request is made.
Complete options¶
const client = new OkatanaClient({
baseUrl: process.env.OKATANA_URL!,
apiKey: process.env.OKATANA_API_KEY!,
timeoutMs: 30_000,
defaultHeaders: {
'X-Integration-Name': 'release-automation',
},
retry: {
maxRetries: 2,
baseDelayMs: 250,
maxDelayMs: 4_000,
retryStatuses: [429, 500, 502, 503, 504],
retryTransportErrors: true,
},
logger: console,
});
Custom fetch¶
Use fetch injection for tracing, proxies, tests, or runtime-specific HTTP stacks.