REST APIs for managing Version Metadata entities
- get - Get all metadata for a particular apiID and versionID.
- insert_version - Insert metadata for a particular apiID and versionID.
- delete_version - Delete metadata for a particular apiID and versionID.
Get all metadata for a particular apiID and versionID.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.metadata.get(api_id="<id>", version_id="<id>")
if ! res.version_metadata.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
api_id |
::String | ✔️ | The ID of the Api to retrieve metadata for. |
version_id |
::String | ✔️ | The version ID of the Api to retrieve metadata for. |
T.nilable(::OpenApiSDK::Operations::GetVersionMetadataResponse)
Insert metadata for a particular apiID and versionID.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.metadata.insert_version(api_id="<id>", version_id="<id>", version_metadata=::OpenApiSDK::Shared::VersionMetadataInput.new(
meta_key: "<value>",
meta_value: "<value>",
))
if ! res.version_metadata.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
api_id |
::String | ✔️ | The ID of the Api to insert metadata for. |
version_id |
::String | ✔️ | The version ID of the Api to insert metadata for. |
version_metadata |
::OpenApiSDK::Shared::VersionMetadataInput | ✔️ | A JSON representation of the metadata to insert. |
T.nilable(::OpenApiSDK::Operations::InsertVersionMetadataResponse)
Delete metadata for a particular apiID and versionID.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.metadata.delete_version(api_id="<id>", version_id="<id>", meta_key="<value>", meta_value="<value>")
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
api_id |
::String | ✔️ | The ID of the Api to delete metadata for. |
version_id |
::String | ✔️ | The version ID of the Api to delete metadata for. |
meta_key |
::String | ✔️ | The key of the metadata to delete. |
meta_value |
::String | ✔️ | The value of the metadata to delete. |
T.nilable(::OpenApiSDK::Operations::DeleteVersionMetadataResponse)