keboola / vault-api-client
Keboola Vault API client
2.0.0
2026-06-22 07:27 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.5
- keboola/php-api-client-base: *@dev
- monolog/monolog: ^2.0|^3.0
- webmozart/assert: ^1.11
Requires (Dev)
- infection/infection: ^0.27
- keboola/coding-standard: ^15.0
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^9.6
- sempro/phpunit-pretty-print: ^1.4
- symfony/http-client: ^6.3|^7.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 2.0.0
- 1.0.1
- 1.0.0
- 0.1.1
- 0.1.0
- dev-odin/AJDA-3137-1
- dev-pepa/gha
- dev-detached
- dev-devin/1767783154-bearer-token-api-bundle
- dev-devin/1769548300-improve-output-mapping-error-message
- dev-erik-AJDA-1087-single-job-v3
- dev-odin/AJDA-2841
- dev-pepa/PAT-1551_dropTimeout
- dev-pepa/symfony-httpclient-spike
- dev-pepa_PAT-64_podWatch
- dev-zajca-event-grid
- dev-PST-2442-ondra
- dev-pepa_k8s_deployment
- dev-roman-pst-1710
This package is auto-updated.
Last update: 2026-08-27 15:49:49 UTC
README
PHP client for the Keboola Vault API, built on top of keboola/php-api-client-base.
Installation
composer require keboola/vault-api-client
Usage
use Keboola\VaultApiClient\Variables\Model\ListOptions; use Keboola\VaultApiClient\Variables\Model\Variable; use Keboola\VaultApiClient\Variables\VariablesApiClient; $client = new VariablesApiClient( baseUrl: 'https://vault.keboola.com', token: 'your-storage-api-token', ); // Create a variable $variable = $client->createVariable( key: 'MY_SECRET', value: 'secret-value', flags: [Variable::FLAG_ENCRYPTED], attributes: ['branchId' => '123'], ); // List variables $variables = $client->listVariables(new ListOptions(offset: 0, limit: 50)); // List scoped variables for a branch $branchVariables = $client->listScopedVariablesForBranch(branchId: '123'); // Delete a variable $client->deleteVariable(hash: $variable->hash);
Custom configuration
Pass retry, timeout, and logging options directly as constructor parameters:
use Monolog\Logger; $client = new VariablesApiClient( baseUrl: 'https://vault.keboola.com', token: 'your-storage-api-token', backoffMaxTries: 3, logger: new Logger('vault'), );
License
MIT licensed, see LICENSE file.