Skip to content

Installation

Requirements

  • PHP 8.2 or newer.
  • Composer 2.
  • A network-reachable Okatana deployment exposing the External API v1.
  • An organization-scoped Okatana API credential with the scopes needed by the integration.

Composer

For local development using an extracted okatana-php directory, use a Composer path repository:

composer config repositories.okatana path ../okatana-php
composer require newfoundcodes/okatana-php:@dev

For published releases on Packagist:

composer require newfoundcodes/okatana-php

Depends on Guzzle, PSR HTTP interfaces, and PSR logging interfaces. Communicates via PSR-18; default transport can be replaced.

Environment variables

Example environment variables:

OKATANA_URL=https://pm.internal.example
OKATANA_TOKEN=oka_public.secret
OKATANA_ORG=01H...

Avoid committing tokens to .env files. Use standard secret management facilities.

Verify installation

<?php

require __DIR__ . '/vendor/autoload.php';

use Newfoundcodes\Okatana\OkatanaClient;

$client = OkatanaClient::create(
    baseUrl: $_ENV['OKATANA_URL'],
    apiKey: $_ENV['OKATANA_TOKEN'],
);

$response = $client->organizations()->get($_ENV['OKATANA_ORG']);
echo $response->statusCode . PHP_EOL;

Valid credentials return 200. Authentication and authorization failures throw typed exceptions.

Documentation dependencies

Build documentation:

python -m pip install -r requirements-docs.txt
mkdocs serve

For a production build:

mkdocs build --strict