(metadata)
REST APIs for managing Version Metadata entities
- deleteVersionMetadata - Delete metadata for a particular apiID and versionID.
- getVersionMetadata - Get all metadata for a particular apiID and versionID.
- insertVersionMetadata - Insert metadata for a particular apiID and versionID.
Delete metadata for a particular apiID and versionID.
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
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\DeleteVersionMetadataRequest | ✔️ | The request object to use for the request. |
?Operations\DeleteVersionMetadataResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
Get all metadata for a particular apiID and versionID.
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
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetVersionMetadataRequest | ✔️ | The request object to use for the request. |
?Operations\GetVersionMetadataResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
Insert metadata for a particular apiID and versionID.
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
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\InsertVersionMetadataRequest | ✔️ | The request object to use for the request. |
?Operations\InsertVersionMetadataResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |