Production operations¶
This guide describes operating an application with the SDK. It is not a replacement for server administration guidance.
Configuration contract¶
Treat OKATANA_URL and OKATANA_TOKEN as deployment configuration. The URL identifies the Okatana deployment. The token identifies an organization-scoped integration principal.
Environment shape:
The SDK appends /api/v1 if the URL omits it.
Separate credentials by workload¶
Do not share one token across unrelated systems. Examples:
- reporting worker: project/ticket/document read and analytics read;
- release worker: project read, board read, ticket write, comment write, notification write;
- documentation publisher: document read/write and document-comment write.
This isolates failures and produces clearer audit trails.
Retry ownership¶
Assign a single retry owner. If an external queue or workflow engine retries jobs, disable SDK retries via RetryPolicy::disabled(). Nested retries multiply requests.
Write operations lack an idempotency key. Store returned IDs immediately. If a create operation fails ambiguously, check a stable marker before replaying.
Rate-limit handling¶
A 429 status throws RateLimitException. The exception provides a parsed Retry-After value if present. Default retries apply only to reads.
For exports:
- use the maximum
per_pageallowed; - process sequentially;
- checkpoint the current page or object;
- back off when rate-limited;
- avoid caching all pages in memory.
Logging¶
Inject a PSR-3 logger for request telemetry:
The SDK logs request method, path, status, attempt count, and duration. It omits the API token and JSON bodies.
Do not log authorization headers or payloads to HTTP debug logs without reviewing data handling policies.
Timeouts¶
The Guzzle client applies the configured request timeout and limits connection timeouts to ten seconds. If injecting a PSR-18 client, set timeouts on the transport directly.
Set timeouts based on workload requirements. Command-line exports support longer timeouts than web requests.
Queue workers¶
For write operations:
- log the intent before sending;
- record the Okatana ULID upon success;
- use a business marker to reconcile creates;
- avoid blind POST replays;
- treat
401,403, and422as client errors; - handle
429and5xxper the worker retry policy.
Health checks¶
Do not use mutations as health checks. Use the smallest authorized read endpoint, such as organization read.
A health endpoint must distinguish:
- transport failure;
- authentication failure;
- authorization failure;
- server error;
- valid API response.
Exclude tokens and exception payloads from public endpoints.
Credential rotation¶
Rotation requires configuration changes:
- issue a replacement credential with identical or reduced scopes;
- deploy the secret;
- execute a read/write verification test;
- revoke the previous credential;
- verify the previous credential fails.
Upgrade procedure¶
When upgrading the SDK or deployment:
- diff the deployed OpenAPI document against
resources/openapi.yaml; - run
composer test; - run
composer analyse; - execute an integration test on a non-production deployment;
- verify pagination behavior and compatibility parameters;
- deploy per application release processes.