Skip to content

Latest commit

 

History

History
287 lines (175 loc) · 8.58 KB

File metadata and controls

287 lines (175 loc) · 8.58 KB

Artifacts

Overview

REST APIs for working with Registry artifacts

Available Operations

preflight

Get access token for communicating with OCI distribution endpoints

Example Usage

require 'speakeasy_client_sdk_ruby'


s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    api_key: "<YOUR_API_KEY_HERE>",
  )
)


req = ::OpenApiSDK::Shared::PreflightRequest.new(
  namespace_name: "<value>",
)
    
res = s.artifacts.preflight(req)

if ! res.preflight_token.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request ::OpenApiSDK::Shared::PreflightRequest ✔️ The request object to use for the request.

Response

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

get_namespaces

Each namespace contains many revisions.

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.artifacts.get_namespaces()

if ! res.get_namespaces_response.nil?
  # handle response
end

Response

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

get_revisions

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.artifacts.get_revisions(namespace_name="<value>", next_page_token="<value>")

if ! res.get_revisions_response.nil?
  # handle response
end

Parameters

Parameter Type Required Description
namespace_name ::String ✔️ N/A
next_page_token T.nilable(::String) Token to retrieve the next page of results

Response

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

get_tags

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.artifacts.get_tags(namespace_name="<value>")

if ! res.get_tags_response.nil?
  # handle response
end

Parameters

Parameter Type Required Description
namespace_name ::String ✔️ N/A

Response

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

post_tags

Add tags to an existing revision

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.artifacts.post_tags(namespace_name="<value>", add_tags=::OpenApiSDK::Shared::AddTags.new(
  revision_digest: "<value>",
  tags: [
    "<value>",
  ],
))

if res.status_code == 200
  # handle response
end

Parameters

Parameter Type Required Description
namespace_name ::String ✔️ N/A
add_tags T.nilable(::OpenApiSDK::Shared::AddTags) A JSON representation of the tags to add

Response

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

get_manifest

Get manifest for a particular reference

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.artifacts.get_manifest(organization_slug="<value>", workspace_slug="<value>", namespace_name="<value>", revision_reference="<value>")

if ! res.manifest.nil?
  # handle response
end

Parameters

Parameter Type Required Description
organization_slug ::String ✔️ N/A
workspace_slug ::String ✔️ N/A
namespace_name ::String ✔️ N/A
revision_reference ::String ✔️ Tag or digest

Response

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

get_blob

Get blob for a particular digest

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.artifacts.get_blob(organization_slug="<value>", workspace_slug="<value>", namespace_name="<value>", digest="<value>")

if ! res.blob.nil?
  # handle response
end

Parameters

Parameter Type Required Description
organization_slug ::String ✔️ N/A
workspace_slug ::String ✔️ N/A
namespace_name ::String ✔️ N/A
digest ::String ✔️ N/A

Response

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