Skip to content

Latest commit

 

History

History
547 lines (385 loc) · 19.6 KB

File metadata and controls

547 lines (385 loc) · 19.6 KB

Artifacts

(artifacts)

Overview

REST APIs for working with Registry artifacts

Available Operations

createRemoteSource

Configure a new remote source

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Shared\RemoteSource(
    inputs: [
        new Shared\RemoteDocument(
            registryUrl: 'https://productive-swine.net',
        ),
    ],
    output: new Shared\RemoteDocument(
        registryUrl: 'https://spiteful-apricot.info',
    ),
);

$response = $sdk->artifacts->createRemoteSource(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

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

Response

?Operations\CreateRemoteSourceResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getBlob

Get blob for a particular digest

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\GetBlobRequest(
    digest: '<value>',
    namespaceName: '<value>',
    organizationSlug: '<value>',
    workspaceSlug: '<value>',
);

$response = $sdk->artifacts->getBlob(
    request: $request
);

if ($response->blob !== null) {
    // handle response
}

Parameters

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

Response

?Operations\GetBlobResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getManifest

Get manifest for a particular reference

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\GetManifestRequest(
    namespaceName: '<value>',
    organizationSlug: '<value>',
    revisionReference: '<value>',
    workspaceSlug: '<value>',
);

$response = $sdk->artifacts->getManifest(
    request: $request
);

if ($response->manifest !== null) {
    // handle response
}

Parameters

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

Response

?Operations\GetManifestResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getNamespaces

Each namespace contains many revisions.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();



$response = $sdk->artifacts->getNamespaces(

);

if ($response->getNamespacesResponse !== null) {
    // handle response
}

Response

?Operations\GetNamespacesResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getRevisions

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\GetRevisionsRequest(
    namespaceName: '<value>',
);

$response = $sdk->artifacts->getRevisions(
    request: $request
);

if ($response->getRevisionsResponse !== null) {
    // handle response
}

Parameters

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

Response

?Operations\GetRevisionsResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getTags

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\GetTagsRequest(
    namespaceName: '<value>',
);

$response = $sdk->artifacts->getTags(
    request: $request
);

if ($response->getTagsResponse !== null) {
    // handle response
}

Parameters

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

Response

?Operations\GetTagsResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

listRemoteSources

Get remote sources attached to a particular namespace

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\ListRemoteSourcesRequest(
    namespaceName: '<value>',
);

$response = $sdk->artifacts->listRemoteSources(
    request: $request
);

if ($response->remoteSource !== null) {
    // handle response
}

Parameters

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

Response

?Operations\ListRemoteSourcesResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

postTags

Add tags to an existing revision

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\PostTagsRequest(
    namespaceName: '<value>',
);

$response = $sdk->artifacts->postTags(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

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

Response

?Operations\PostTagsResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

preflight

Get access token for communicating with OCI distribution endpoints

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Shared\PreflightRequest(
    namespaceName: '<value>',
);

$response = $sdk->artifacts->preflight(
    request: $request
);

if ($response->preflightToken !== null) {
    // handle response
}

Parameters

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

Response

?Operations\PreflightResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

setVisibility

Set visibility of a namespace with an existing metadata entry

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\SetVisibilityRequest(
    namespaceName: '<value>',
);

$response = $sdk->artifacts->setVisibility(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

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

Response

?Operations\SetVisibilityResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*