Skip to content

Latest commit

 

History

History
257 lines (174 loc) · 8.13 KB

URLSigningKeysApi.md

File metadata and controls

257 lines (174 loc) · 8.13 KB

MuxPhp\URLSigningKeysApi

All URIs are relative to https://api.mux.com, except if the operation defines another base path.

Method HTTP request Description
createUrlSigningKey() POST /video/v1/signing-keys Create a URL signing key
deleteUrlSigningKey() DELETE /video/v1/signing-keys/{SIGNING_KEY_ID} Delete a URL signing key
getUrlSigningKey() GET /video/v1/signing-keys/{SIGNING_KEY_ID} Retrieve a URL signing key
listUrlSigningKeys() GET /video/v1/signing-keys List URL signing keys

createUrlSigningKey()

createUrlSigningKey(): \MuxPhp\Models\SigningKeyResponse

Create a URL signing key

This route is now deprecated, please use the Signing Keys API. Creates a new signing key pair. When creating a new signing key, the API will generate a 2048-bit RSA key-pair and return the private key and a generated key-id; the public key will be stored at Mux to validate signed tokens. Note: Any new access tokens authenticating this route will be required to have System level permissions.

Example

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


// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MuxPhp\Api\URLSigningKeysApi(
    // 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->createUrlSigningKey();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLSigningKeysApi->createUrlSigningKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\MuxPhp\Models\SigningKeyResponse

Authorization

accessToken

HTTP request headers

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

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

deleteUrlSigningKey()

deleteUrlSigningKey($signing_key_id)

Delete a URL signing key

This route is now deprecated, please use the Signing Keys API. Deletes an existing signing key. Use with caution, as this will invalidate any existing signatures and no URLs can be signed using the key again. Note: Any new access tokens authenticating this route will be required to have System level permissions.

Example

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


// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MuxPhp\Api\URLSigningKeysApi(
    // 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
);
$signing_key_id = 'signing_key_id_example'; // string | The ID of the signing key.

try {
    $apiInstance->deleteUrlSigningKey($signing_key_id);
} catch (Exception $e) {
    echo 'Exception when calling URLSigningKeysApi->deleteUrlSigningKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
signing_key_id string The ID of the signing key.

Return type

void (empty response body)

Authorization

accessToken

HTTP request headers

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

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

getUrlSigningKey()

getUrlSigningKey($signing_key_id): \MuxPhp\Models\SigningKeyResponse

Retrieve a URL signing key

This route is now deprecated, please use the Signing Keys API. Retrieves the details of a URL signing key that has previously been created. Supply the unique signing key ID that was returned from your previous request, and Mux will return the corresponding signing key information. The private key is not returned in this response. Note: Any new access tokens authenticating this route will be required to have System level permissions.

Example

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


// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MuxPhp\Api\URLSigningKeysApi(
    // 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
);
$signing_key_id = 'signing_key_id_example'; // string | The ID of the signing key.

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

Parameters

Name Type Description Notes
signing_key_id string The ID of the signing key.

Return type

\MuxPhp\Models\SigningKeyResponse

Authorization

accessToken

HTTP request headers

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

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

listUrlSigningKeys()

listUrlSigningKeys($limit, $page): \MuxPhp\Models\ListSigningKeysResponse

List URL signing keys

This route is now deprecated, please use the Signing Keys API. Returns a list of URL signing keys. Note: Any new access tokens authenticating this route will be required to have System level permissions.

Example

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


// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MuxPhp\Api\URLSigningKeysApi(
    // 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
);
$limit = 25; // int | Number of items to include in the response
$page = 1; // int | Offset by this many pages, of the size of `limit`

try {
    $result = $apiInstance->listUrlSigningKeys($limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling URLSigningKeysApi->listUrlSigningKeys: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
limit int Number of items to include in the response [optional] [default to 25]
page int Offset by this many pages, of the size of `limit` [optional] [default to 1]

Return type

\MuxPhp\Models\ListSigningKeysResponse

Authorization

accessToken

HTTP request headers

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

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