Skip to content

Latest commit

 

History

History
133 lines (82 loc) · 6.05 KB

File metadata and controls

133 lines (82 loc) · 6.05 KB

Metadata

Overview

REST APIs for managing Version Metadata entities

Available Operations

  • 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

Get all metadata for a particular apiID and versionID.

Example Usage

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

Parameters

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.

Response

T.nilable(::OpenApiSDK::Operations::GetVersionMetadataResponse)

insert_version

Insert metadata for a particular apiID and versionID.

Example Usage

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

Parameters

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.

Response

T.nilable(::OpenApiSDK::Operations::InsertVersionMetadataResponse)

delete_version

Delete metadata for a particular apiID and versionID.

Example Usage

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

Parameters

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.

Response

T.nilable(::OpenApiSDK::Operations::DeleteVersionMetadataResponse)