(artifacts())
REST APIs for working with Registry artifacts
Configure a new remote source
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.CreateRemoteSourceResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.RemoteDocument;
import dev.speakeasyapi.javaclientsdk.models.shared.RemoteSource;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
RemoteSource req = RemoteSource.builder()
.inputs(List.of(
RemoteDocument.builder()
.registryUrl("https://productive-swine.net")
.build()))
.output(RemoteDocument.builder()
.registryUrl("https://spiteful-apricot.info")
.build())
.build();
CreateRemoteSourceResponse res = sdk.artifacts().createRemoteSource()
.request(req)
.call();
// handle response
}
}
Parameter |
Type |
Required |
Description |
request |
RemoteSource |
✔️ |
The request object to use for the request. |
CreateRemoteSourceResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
Get blob for a particular digest
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetBlobRequest req = GetBlobRequest.builder()
.digest("<value>")
.namespaceName("<value>")
.organizationSlug("<value>")
.workspaceSlug("<value>")
.build();
GetBlobResponse res = sdk.artifacts().getBlob()
.request(req)
.call();
if (res.blob().isPresent()) {
// handle response
}
}
}
Parameter |
Type |
Required |
Description |
request |
GetBlobRequest |
✔️ |
The request object to use for the request. |
GetBlobResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
Get manifest for a particular reference
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetManifestRequest req = GetManifestRequest.builder()
.namespaceName("<value>")
.organizationSlug("<value>")
.revisionReference("<value>")
.workspaceSlug("<value>")
.build();
GetManifestResponse res = sdk.artifacts().getManifest()
.request(req)
.call();
if (res.manifest().isPresent()) {
// handle response
}
}
}
Parameter |
Type |
Required |
Description |
request |
GetManifestRequest |
✔️ |
The request object to use for the request. |
GetManifestResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
Each namespace contains many revisions.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GetNamespacesResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetNamespacesResponse res = sdk.artifacts().getNamespaces()
.call();
if (res.getNamespacesResponse().isPresent()) {
// handle response
}
}
}
GetNamespacesResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetRevisionsRequest req = GetRevisionsRequest.builder()
.namespaceName("<value>")
.build();
GetRevisionsResponse res = sdk.artifacts().getRevisions()
.request(req)
.call();
if (res.getRevisionsResponse().isPresent()) {
// handle response
}
}
}
Parameter |
Type |
Required |
Description |
request |
GetRevisionsRequest |
✔️ |
The request object to use for the request. |
GetRevisionsResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetTagsRequest req = GetTagsRequest.builder()
.namespaceName("<value>")
.build();
GetTagsResponse res = sdk.artifacts().getTags()
.request(req)
.call();
if (res.getTagsResponse().isPresent()) {
// handle response
}
}
}
Parameter |
Type |
Required |
Description |
request |
GetTagsRequest |
✔️ |
The request object to use for the request. |
GetTagsResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
Get remote sources attached to a particular namespace
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.ListRemoteSourcesRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.ListRemoteSourcesResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
ListRemoteSourcesRequest req = ListRemoteSourcesRequest.builder()
.namespaceName("<value>")
.build();
ListRemoteSourcesResponse res = sdk.artifacts().listRemoteSources()
.request(req)
.call();
if (res.remoteSource().isPresent()) {
// handle response
}
}
}
ListRemoteSourcesResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
Add tags to an existing revision
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
PostTagsRequest req = PostTagsRequest.builder()
.namespaceName("<value>")
.build();
PostTagsResponse res = sdk.artifacts().postTags()
.request(req)
.call();
// handle response
}
}
Parameter |
Type |
Required |
Description |
request |
PostTagsRequest |
✔️ |
The request object to use for the request. |
PostTagsResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
Get access token for communicating with OCI distribution endpoints
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.PreflightResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.PreflightRequest;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
PreflightRequest req = PreflightRequest.builder()
.namespaceName("<value>")
.build();
PreflightResponse res = sdk.artifacts().preflight()
.request(req)
.call();
if (res.preflightToken().isPresent()) {
// handle response
}
}
}
Parameter |
Type |
Required |
Description |
request |
PreflightRequest |
✔️ |
The request object to use for the request. |
PreflightResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |
Set visibility of a namespace with an existing metadata entry
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.SetVisibilityRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.SetVisibilityResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Error, Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
SetVisibilityRequest req = SetVisibilityRequest.builder()
.namespaceName("<value>")
.build();
SetVisibilityResponse res = sdk.artifacts().setVisibility()
.request(req)
.call();
// handle response
}
}
Parameter |
Type |
Required |
Description |
request |
SetVisibilityRequest |
✔️ |
The request object to use for the request. |
SetVisibilityResponse
Error Type |
Status Code |
Content Type |
models/errors/Error |
4XX |
application/json |
models/errors/SDKError |
5XX |
*/* |