Configuration¶
OkatanaClient is created through a builder. Two values are mandatory: the deployment URL and API key.
var client = OkatanaClient.builder()
.baseUrl("https://okatana.internal.example")
.apiKey(secretFromVault)
.build();
URL normalization¶
If the deployment URL does not end with /api/v1, the SDK adds the versioned path.
| Input | Effective API base |
|---|---|
https://okatana.example |
https://okatana.example/api/v1/ |
https://okatana.example/api/v1 |
https://okatana.example/api/v1/ |
https://platform.example/okatana |
https://platform.example/okatana/api/v1/ |
https://platform.example/okatana/api/v1/ |
unchanged |
The SDK rejects relative URLs, non-HTTP schemes, embedded user information, query strings, and fragments.
Timeouts¶
Default request timeout: 30 seconds.
Default connection timeout for an SDK-created HttpClient: 10 seconds.
var client = OkatanaClient.builder()
.baseUrl(url)
.apiKey(token)
.connectTimeout(Duration.ofSeconds(3))
.timeout(Duration.ofSeconds(15))
.build();
User-Agent¶
Default:
Override it when your operations team needs application-level identification:
Never place secrets in the User-Agent.
Injecting infrastructure¶
You can provide your own HttpClient, ObjectMapper, retry policy, and observer. See Custom HTTP client and Observability.