Skip to content

Latest commit

 

History

History
426 lines (287 loc) · 18.5 KB

File metadata and controls

426 lines (287 loc) · 18.5 KB

Artifacts

(Artifacts)

Overview

REST APIs for working with Registry artifacts

Available Operations

CreateRemoteSource

Configure a new remote source

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;
using System.Collections.Generic;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

RemoteSource req = new RemoteSource() {
    Inputs = new List<RemoteDocument>() {
        new RemoteDocument() {
            RegistryUrl = "https://productive-swine.net",
        },
    },
    Output = new RemoteDocument() {
        RegistryUrl = "https://spiteful-apricot.info",
    },
};

var res = await sdk.Artifacts.CreateRemoteSourceAsync(req);

// handle response

Parameters

Parameter Type Required Description
request RemoteSource ✔️ The request object to use for the request.

Response

CreateRemoteSourceResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

GetBlob

Get blob for a particular digest

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

GetBlobRequest req = new GetBlobRequest() {
    Digest = "<value>",
    NamespaceName = "<value>",
    OrganizationSlug = "<value>",
    WorkspaceSlug = "<value>",
};

var res = await sdk.Artifacts.GetBlobAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetBlobRequest ✔️ The request object to use for the request.

Response

GetBlobResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

GetManifest

Get manifest for a particular reference

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

GetManifestRequest req = new GetManifestRequest() {
    NamespaceName = "<value>",
    OrganizationSlug = "<value>",
    RevisionReference = "<value>",
    WorkspaceSlug = "<value>",
};

var res = await sdk.Artifacts.GetManifestAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetManifestRequest ✔️ The request object to use for the request.

Response

GetManifestResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

GetNamespaces

Each namespace contains many revisions.

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

var res = await sdk.Artifacts.GetNamespacesAsync();

// handle response

Response

Models.Operations.GetNamespacesResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

GetRevisions

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

GetRevisionsRequest req = new GetRevisionsRequest() {
    NamespaceName = "<value>",
};

var res = await sdk.Artifacts.GetRevisionsAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetRevisionsRequest ✔️ The request object to use for the request.

Response

Models.Operations.GetRevisionsResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

GetTags

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

GetTagsRequest req = new GetTagsRequest() {
    NamespaceName = "<value>",
};

var res = await sdk.Artifacts.GetTagsAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetTagsRequest ✔️ The request object to use for the request.

Response

Models.Operations.GetTagsResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

ListRemoteSources

Get remote sources attached to a particular namespace

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

ListRemoteSourcesRequest req = new ListRemoteSourcesRequest() {
    NamespaceName = "<value>",
};

var res = await sdk.Artifacts.ListRemoteSourcesAsync(req);

// handle response

Parameters

Parameter Type Required Description
request ListRemoteSourcesRequest ✔️ The request object to use for the request.

Response

ListRemoteSourcesResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

PostTags

Add tags to an existing revision

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

PostTagsRequest req = new PostTagsRequest() {
    NamespaceName = "<value>",
};

var res = await sdk.Artifacts.PostTagsAsync(req);

// handle response

Parameters

Parameter Type Required Description
request PostTagsRequest ✔️ The request object to use for the request.

Response

PostTagsResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

Preflight

Get access token for communicating with OCI distribution endpoints

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

PreflightRequest req = new PreflightRequest() {
    NamespaceName = "<value>",
};

var res = await sdk.Artifacts.PreflightAsync(req);

// handle response

Parameters

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

Response

PreflightResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*

SetVisibility

Set visibility of a namespace with an existing metadata entry

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

SetVisibilityRequest req = new SetVisibilityRequest() {
    NamespaceName = "<value>",
};

var res = await sdk.Artifacts.SetVisibilityAsync(req);

// handle response

Parameters

Parameter Type Required Description
request SetVisibilityRequest ✔️ The request object to use for the request.

Response

SetVisibilityResponse

Errors

Error Type Status Code Content Type
SpeakeasySDK.Models.Errors.Error 4XX application/json
SpeakeasySDK.Models.Errors.SDKException 5XX */*