Skip to content

Configuration

Required settings

OkatanaClientOptions requires both BaseUrl and ApiKey.

var options = new OkatanaClientOptions
{
    BaseUrl = configuration["Okatana:Url"]
        ?? throw new InvalidOperationException("Okatana:Url is required."),
    ApiKey = configuration["Okatana:ApiKey"]
        ?? throw new InvalidOperationException("Okatana:ApiKey is required.")
};

There is no fallback API URL. This is intentional because the public Okatana documentation host is not the user's deployment.

URL normalization

These values are valid:

https://okatana.example.com
https://okatana.example.com/api/v1
https://internal.example.com/okatana
https://internal.example.com/okatana/api/v1

They normalize respectively to an API base that ends with /api/v1/. A supplied deployment subpath remains intact.

The SDK rejects relative URLs, non-HTTP(S) schemes, query strings, and fragments. This prevents ambiguous routing and keeps credential boundaries clear.

Timeouts and retries

var options = new OkatanaClientOptions
{
    BaseUrl = "https://okatana.example.com",
    ApiKey = secret,
    Timeout = TimeSpan.FromSeconds(30),
    SafeReadRetries = 3,
    InitialRetryDelay = TimeSpan.FromMilliseconds(250),
    MaximumRetryDelay = TimeSpan.FromSeconds(5),
    UserAgent = "Acme.OkatanaIntegration/4.2"
};

SafeReadRetries affects GET requests only unless a call explicitly sets MaxRetries. See Retries and idempotency.

Per-call configuration

var requestOptions = new OkatanaRequestOptions
{
    Timeout = TimeSpan.FromSeconds(10),
    MaxRetries = 1,
    Headers = new Dictionary<string, string>
    {
        ["X-Correlation-ID"] = correlationId,
        ["X-Workload"] = "nightly-export"
    }
};

Authorization cannot be overridden. The configured API key always controls authentication.