All URIs are relative to http://localhost, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createApiKey() | POST /v2/api-key | Create Api Key |
deleteApiKey() | DELETE /v2/api-key/{api_key_id} | Delete Api Key |
getApiKey() | GET /v2/api-key/{api_key_id} | Get Api Key |
getApiKeyScope() | GET /v2/api-key/scope | Get Api Key Scope |
getEnvironmentApiKey() | GET /v2/api-key/{proj_id}/{env_id} | Get Environment Api Key |
listApiKeys() | GET /v2/api-key | List Api Keys |
createApiKey($api_key_create): \OpenAPI\Client\Model\APIKeyRead
Create Api Key
Creates a new api_key under the active organization.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\APIKeysApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$api_key_create = new \OpenAPI\Client\Model\APIKeyCreate(); // \OpenAPI\Client\Model\APIKeyCreate
try {
$result = $apiInstance->createApiKey($api_key_create);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APIKeysApi->createApiKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
api_key_create | \OpenAPI\Client\Model\APIKeyCreate |
\OpenAPI\Client\Model\APIKeyRead
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteApiKey($api_key_id)
Delete Api Key
Deletes the api_key and all its related data.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\APIKeysApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$api_key_id = 'api_key_id_example'; // string | The unique id of the API key
try {
$apiInstance->deleteApiKey($api_key_id);
} catch (Exception $e) {
echo 'Exception when calling APIKeysApi->deleteApiKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
api_key_id | string | The unique id of the API key |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getApiKey($api_key_id): \OpenAPI\Client\Model\APIKeyRead
Get Api Key
Gets a single api_key matching the given api_key_id, if such api_key exists.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\APIKeysApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$api_key_id = 'api_key_id_example'; // string | The unique id of the API key
try {
$result = $apiInstance->getApiKey($api_key_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APIKeysApi->getApiKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
api_key_id | string | The unique id of the API key |
\OpenAPI\Client\Model\APIKeyRead
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getApiKeyScope(): \OpenAPI\Client\Model\APIKeyScopeRead
Get Api Key Scope
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\APIKeysApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getApiKeyScope();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APIKeysApi->getApiKeyScope: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\OpenAPI\Client\Model\APIKeyScopeRead
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getEnvironmentApiKey($proj_id, $env_id): \OpenAPI\Client\Model\APIKeyRead
Get Environment Api Key
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\APIKeysApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
try {
$result = $apiInstance->getEnvironmentApiKey($proj_id, $env_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APIKeysApi->getEnvironmentApiKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). |
\OpenAPI\Client\Model\APIKeyRead
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listApiKeys($page, $per_page): \OpenAPI\Client\Model\PaginatedResultAPIKeyRead
List Api Keys
Lists all the api_keys under the active organization.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\APIKeysApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$page = 1; // int | Page number of the results to fetch, starting at 1.
$per_page = 30; // int | The number of results per page (max 100).
try {
$result = $apiInstance->listApiKeys($page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APIKeysApi->listApiKeys: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
page | int | Page number of the results to fetch, starting at 1. | [optional] [default to 1] |
per_page | int | The number of results per page (max 100). | [optional] [default to 30] |
\OpenAPI\Client\Model\PaginatedResultAPIKeyRead
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]