PHP code example of keystackapp / keystack-php-manager-client

1. Go to this page and download the library: Download keystackapp/keystack-php-manager-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

keystackapp / keystack-php-manager-client example snippets





 Configure Bearer (JWT) authorization: Bearer
$config = KeyStack\Manager\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new KeyStack\Manager\Api\ManagerApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$manifestAddSchema = new \KeyStack\Manager\Model\ManifestAddSchema(); // \KeyStack\Manager\Model\ManifestAddSchema

try {
    $result = $apiInstance->addManifestRecord($manifestAddSchema);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ManagerApi->addManifestRecord: ', $e->getMessage(), PHP_EOL;
}