Skip to content

Latest commit

 

History

History
290 lines (197 loc) · 9.09 KB

AccessKeysApi.md

File metadata and controls

290 lines (197 loc) · 9.09 KB

Cloudinary\Provisioning\AccessKeysApi

All URIs are relative to https://api.cloudinary.com/v1_1/provisioning/accounts/ACCOUNT_ID, except if the operation defines another base path.

Method HTTP request Description
deleteAccessKey() DELETE /sub_accounts/{sub_account_id}/access_keys/{key} Delete access key
deleteAccessKeyByName() DELETE /sub_accounts/{sub_account_id}/access_keys Delete access key by name
generateAccessKey() POST /sub_accounts/{sub_account_id}/access_keys Generate an access key
getAccessKeys() GET /sub_accounts/{sub_account_id}/access_keys Get access keys
updateAccessKey() PUT /sub_accounts/{sub_account_id}/access_keys/{key} Update an access key

deleteAccessKey()

deleteAccessKey($subAccountId, $key): \Cloudinary\Provisioning\Model\SuccessResponse

Delete access key

Delete a specific access key.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\AccessKeysApi();

$subAccountId = "abcde1fghij2klmno3pqrst4uvwxy5z"; // string | The ID of the product environment.
$key = "814814814814814"; // string | The access key (api key).

try {
    $result = $apiInstance->deleteAccessKey($subAccountId, $key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->deleteAccessKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
subAccountId string The ID of the product environment.
key string The access key (api key).

Return type

\Cloudinary\Provisioning\Model\SuccessResponse

Authorization

basicAuth

HTTP request headers

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

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

deleteAccessKeyByName()

deleteAccessKeyByName($subAccountId, $name): \Cloudinary\Provisioning\Model\SuccessResponse

Delete access key by name

Delete a specific access key by name.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\AccessKeysApi();

$subAccountId = "abcde1fghij2klmno3pqrst4uvwxy5z"; // string | The ID of the product environment.
$name = "main_key"; // string | The access key name.

try {
    $result = $apiInstance->deleteAccessKeyByName($subAccountId, $name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->deleteAccessKeyByName: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
subAccountId string The ID of the product environment.
name string The access key name.

Return type

\Cloudinary\Provisioning\Model\SuccessResponse

Authorization

basicAuth

HTTP request headers

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

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

generateAccessKey()

generateAccessKey($subAccountId, $accessKeyRequest): \Cloudinary\Provisioning\Model\AccessKey

Generate an access key

Generate a new access key.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\AccessKeysApi();

$subAccountId = "abcde1fghij2klmno3pqrst4uvwxy5z"; // string | The ID of the product environment.
$accessKeyRequest = new \Cloudinary\Provisioning\Model\AccessKeyRequest(); // \Cloudinary\Provisioning\Model\AccessKeyRequest | Access key details

try {
    $result = $apiInstance->generateAccessKey($subAccountId, $accessKeyRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->generateAccessKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
subAccountId string The ID of the product environment.
accessKeyRequest \Cloudinary\Provisioning\Model\AccessKeyRequest Access key details [optional]

Return type

\Cloudinary\Provisioning\Model\AccessKey

Authorization

basicAuth

HTTP request headers

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

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

getAccessKeys()

getAccessKeys($subAccountId, $pageSize, $page, $sortBy, $sortOrder): \Cloudinary\Provisioning\Model\AccessKeysResponse

Get access keys

Retrieve an array of all access keys for a product environment.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\AccessKeysApi();

$subAccountId = "abcde1fghij2klmno3pqrst4uvwxy5z"; // string | The ID of the product environment.
$pageSize = 56; // int | How many entries to display on each page.
$page = 56; // int | Which page to return (maximum pages 100). **Default**: All pages are returned.
$sortBy = "created_at"; // string | Which response parameter to sort by. **Possible values**: `api_key`, `created_at`, `name`, `enabled`.
$sortOrder = "asc"; // string | Control the order of returned keys. **Possible values**: `desc` (default), `asc`.

try {
    $result = $apiInstance->getAccessKeys($subAccountId, $pageSize, $page, $sortBy, $sortOrder);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->getAccessKeys: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
subAccountId string The ID of the product environment.
pageSize int How many entries to display on each page. [optional]
page int Which page to return (maximum pages 100). Default: All pages are returned. [optional]
sortBy string Which response parameter to sort by. Possible values: `api_key`, `created_at`, `name`, `enabled`. [optional]
sortOrder string Control the order of returned keys. Possible values: `desc` (default), `asc`. [optional]

Return type

\Cloudinary\Provisioning\Model\AccessKeysResponse

Authorization

basicAuth

HTTP request headers

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

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

updateAccessKey()

updateAccessKey($subAccountId, $key, $accessKeyUpdateRequest): \Cloudinary\Provisioning\Model\AccessKey

Update an access key

Update the name and/or status of an existing access key.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\AccessKeysApi();

$subAccountId = "abcde1fghij2klmno3pqrst4uvwxy5z"; // string | The ID of the product environment.
$key = "814814814814814"; // string | The access key (api key).
$accessKeyUpdateRequest = new \Cloudinary\Provisioning\Model\AccessKeyUpdateRequest(); // \Cloudinary\Provisioning\Model\AccessKeyUpdateRequest | Access key details for update

try {
    $result = $apiInstance->updateAccessKey($subAccountId, $key, $accessKeyUpdateRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->updateAccessKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
subAccountId string The ID of the product environment.
key string The access key (api key).
accessKeyUpdateRequest \Cloudinary\Provisioning\Model\AccessKeyUpdateRequest Access key details for update [optional]

Return type

\Cloudinary\Provisioning\Model\AccessKey

Authorization

basicAuth

HTTP request headers

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

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