Skip to content

Latest commit

 

History

History
174 lines (119 loc) · 7.42 KB

File metadata and controls

174 lines (119 loc) · 7.42 KB

Metadata

(metadata)

Overview

REST APIs for managing Version Metadata entities

Available Operations

deleteVersionMetadata

Delete metadata for a particular apiID and versionID.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\DeleteVersionMetadataRequest(
    apiID: '<id>',
    metaKey: '<value>',
    metaValue: '<value>',
    versionID: '<id>',
);

$response = $sdk->metadata->deleteVersionMetadata(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\DeleteVersionMetadataRequest ✔️ The request object to use for the request.

Response

?Operations\DeleteVersionMetadataResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getVersionMetadata

Get all metadata for a particular apiID and versionID.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\GetVersionMetadataRequest(
    apiID: '<id>',
    versionID: '<id>',
);

$response = $sdk->metadata->getVersionMetadata(
    request: $request
);

if ($response->versionMetadata !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\GetVersionMetadataRequest ✔️ The request object to use for the request.

Response

?Operations\GetVersionMetadataResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

insertVersionMetadata

Insert metadata for a particular apiID and versionID.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\InsertVersionMetadataRequest(
    versionMetadata: new Shared\VersionMetadataInput(
        metaKey: '<value>',
        metaValue: '<value>',
    ),
    apiID: '<id>',
    versionID: '<id>',
);

$response = $sdk->metadata->insertVersionMetadata(
    request: $request
);

if ($response->versionMetadata !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\InsertVersionMetadataRequest ✔️ The request object to use for the request.

Response

?Operations\InsertVersionMetadataResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*