REST APIs for working with Registry artifacts
- preflight - Get access token for communicating with OCI distribution endpoints
- get_namespaces - Each namespace contains many revisions.
- get_revisions
- get_tags
- post_tags - Add tags to an existing revision
- get_manifest - Get manifest for a particular reference
- get_blob - Get blob for a particular digest
Get access token for communicating with OCI distribution endpoints
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
::OpenApiSDK::Shared::PreflightRequest | ✔️ | The request object to use for the request. |
T.nilable(::OpenApiSDK::Operations::PreflightResponse)
Each namespace contains many revisions.
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
T.nilable(::OpenApiSDK::Operations::GetNamespacesResponse)
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
Parameter | Type | Required | Description |
---|---|---|---|
namespace_name |
::String | ✔️ | N/A |
next_page_token |
T.nilable(::String) | ➖ | Token to retrieve the next page of results |
T.nilable(::OpenApiSDK::Operations::GetRevisionsResponse)
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
Parameter | Type | Required | Description |
---|---|---|---|
namespace_name |
::String | ✔️ | N/A |
T.nilable(::OpenApiSDK::Operations::GetTagsResponse)
Add tags to an existing revision
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
Parameter | Type | Required | Description |
---|---|---|---|
namespace_name |
::String | ✔️ | N/A |
add_tags |
T.nilable(::OpenApiSDK::Shared::AddTags) | ➖ | A JSON representation of the tags to add |
T.nilable(::OpenApiSDK::Operations::PostTagsResponse)
Get manifest for a particular reference
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
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 |
T.nilable(::OpenApiSDK::Operations::GetManifestResponse)
Get blob for a particular digest
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
Parameter | Type | Required | Description |
---|---|---|---|
organization_slug |
::String | ✔️ | N/A |
workspace_slug |
::String | ✔️ | N/A |
namespace_name |
::String | ✔️ | N/A |
digest |
::String | ✔️ | N/A |