All URIs are relative to https://api.asknews.app, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| deleteByokKey() | DELETE /v1/byok/{provider} | Delete a stored BYOK API key for a provider |
| getByokKey() | GET /v1/byok/{provider} | Get a stored BYOK API key hint for a provider |
| upsertByokKey() | PUT /v1/byok/{provider} | Store a BYOK API key for a provider |
deleteByokKey($provider)Delete a stored BYOK API key for a provider
Delete a stored BYOK API key for a provider. Bring your own key is reserved for enterprise clients. If you want to use this feature, please contact us at contact@asknews.app
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new AskNews\Api\ByokApi(
// 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
);
$provider = 'provider_example'; // string | The BYOK provider
try {
$apiInstance->deleteByokKey($provider);
} catch (Exception $e) {
echo 'Exception when calling ByokApi->deleteByokKey: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| provider | string | The BYOK provider |
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]
getByokKey($provider): \AskNews\Model\ApiKeyResponseGet a stored BYOK API key hint for a provider
Get the stored BYOK API key hint for a provider. Bring your own key is reserved for enterprise clients. If you want to use this feature, please contact us at contact@asknews.app
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new AskNews\Api\ByokApi(
// 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
);
$provider = 'provider_example'; // string | The BYOK provider
try {
$result = $apiInstance->getByokKey($provider);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ByokApi->getByokKey: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| provider | string | The BYOK provider |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
upsertByokKey($provider, $upsert_api_key_request): \AskNews\Model\ApiKeyResponseStore a BYOK API key for a provider
Store a BYOK API key for a provider. Bring your own key is reserved for enterprise clients. If you want to use this feature, please contact us at contact@asknews.app
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new AskNews\Api\ByokApi(
// 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
);
$provider = 'provider_example'; // string | The BYOK provider
$upsert_api_key_request = new \AskNews\Model\UpsertApiKeyRequest(); // \AskNews\Model\UpsertApiKeyRequest
try {
$result = $apiInstance->upsertByokKey($provider, $upsert_api_key_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ByokApi->upsertByokKey: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| provider | string | The BYOK provider | |
| upsert_api_key_request | \AskNews\Model\UpsertApiKeyRequest |
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]