Skip to content

Latest commit

 

History

History
333 lines (229 loc) · 11.2 KB

BlacklistedKeysApi.md

File metadata and controls

333 lines (229 loc) · 11.2 KB

Phrase\BlacklistedKeysApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
blacklistedKeyCreate POST /projects/{project_id}/blacklisted_keys Create a blocked key
blacklistedKeyDelete DELETE /projects/{project_id}/blacklisted_keys/{id} Delete a blocked key
blacklistedKeyShow GET /projects/{project_id}/blacklisted_keys/{id} Get a single blocked key
blacklistedKeyUpdate PATCH /projects/{project_id}/blacklisted_keys/{id} Update a blocked key
blacklistedKeysList GET /projects/{project_id}/blacklisted_keys List blocked keys

blacklistedKeyCreate

\Phrase\Model\BlacklistedKey blacklistedKeyCreate($project_id, $blacklisted_key_create_parameters, $x_phrase_app_otp)

Create a blocked key

Create a new rule for blocking keys.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');

$apiInstance = new Phrase\Api\BlacklistedKeysApi(
    // 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
);
$project_id = 'project_id_example'; // string | Project ID
$blacklisted_key_create_parameters = new \Phrase\Model\BlacklistedKeyCreateParameters(); // \Phrase\Model\BlacklistedKeyCreateParameters | 
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)

try {
    $result = $apiInstance->blacklistedKeyCreate($project_id, $blacklisted_key_create_parameters, $x_phrase_app_otp);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BlacklistedKeysApi->blacklistedKeyCreate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project_id string Project ID
blacklisted_key_create_parameters \Phrase\Model\BlacklistedKeyCreateParameters
x_phrase_app_otp string Two-Factor-Authentication token (optional) [optional]

Return type

\Phrase\Model\BlacklistedKey

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

blacklistedKeyDelete

blacklistedKeyDelete($project_id, $id, $x_phrase_app_otp)

Delete a blocked key

Delete an existing rule for blocking keys.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');

$apiInstance = new Phrase\Api\BlacklistedKeysApi(
    // 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
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)

try {
    $apiInstance->blacklistedKeyDelete($project_id, $id, $x_phrase_app_otp);
} catch (Exception $e) {
    echo 'Exception when calling BlacklistedKeysApi->blacklistedKeyDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project_id string Project ID
id string ID
x_phrase_app_otp string Two-Factor-Authentication token (optional) [optional]

Return type

void (empty response body)

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

blacklistedKeyShow

\Phrase\Model\BlacklistedKey blacklistedKeyShow($project_id, $id, $x_phrase_app_otp)

Get a single blocked key

Get details on a single rule for blocking keys for a given project.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');

$apiInstance = new Phrase\Api\BlacklistedKeysApi(
    // 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
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)

try {
    $result = $apiInstance->blacklistedKeyShow($project_id, $id, $x_phrase_app_otp);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BlacklistedKeysApi->blacklistedKeyShow: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project_id string Project ID
id string ID
x_phrase_app_otp string Two-Factor-Authentication token (optional) [optional]

Return type

\Phrase\Model\BlacklistedKey

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

blacklistedKeyUpdate

\Phrase\Model\BlacklistedKey blacklistedKeyUpdate($project_id, $id, $blacklisted_key_update_parameters, $x_phrase_app_otp)

Update a blocked key

Update an existing rule for blocking keys.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');

$apiInstance = new Phrase\Api\BlacklistedKeysApi(
    // 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
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$blacklisted_key_update_parameters = new \Phrase\Model\BlacklistedKeyUpdateParameters(); // \Phrase\Model\BlacklistedKeyUpdateParameters | 
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)

try {
    $result = $apiInstance->blacklistedKeyUpdate($project_id, $id, $blacklisted_key_update_parameters, $x_phrase_app_otp);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BlacklistedKeysApi->blacklistedKeyUpdate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project_id string Project ID
id string ID
blacklisted_key_update_parameters \Phrase\Model\BlacklistedKeyUpdateParameters
x_phrase_app_otp string Two-Factor-Authentication token (optional) [optional]

Return type

\Phrase\Model\BlacklistedKey

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

blacklistedKeysList

\Phrase\Model\BlacklistedKey[] blacklistedKeysList($project_id, $x_phrase_app_otp, $page, $per_page, $branch)

List blocked keys

List all rules for blocking keys for the given project.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');

$apiInstance = new Phrase\Api\BlacklistedKeysApi(
    // 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
);
$project_id = 'project_id_example'; // string | Project ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$page = 1; // int | Page number
$per_page = 25; // int | Limit on the number of objects to be returned, between 1 and 100. 25 by default
$branch = my-feature-branch; // string | specify the branch to use

try {
    $result = $apiInstance->blacklistedKeysList($project_id, $x_phrase_app_otp, $page, $per_page, $branch);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BlacklistedKeysApi->blacklistedKeysList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project_id string Project ID
x_phrase_app_otp string Two-Factor-Authentication token (optional) [optional]
page int Page number [optional]
per_page int Limit on the number of objects to be returned, between 1 and 100. 25 by default [optional]
branch string specify the branch to use [optional]

Return type

\Phrase\Model\BlacklistedKey[]

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]