Skip to main content

artifacts

Creates, updates, deletes, gets or lists a artifacts resource.

Overview

Nameartifacts
TypeResource
Idgoogle.apigeeregistry.artifacts

Fields

NameDatatypeDescription
namestringResource name.
annotationsobjectAnnotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.
contentsstringInput only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.
createTimestringOutput only. Creation timestamp.
hashstringOutput only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
labelsobjectLabels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "registry.googleapis.com/" and cannot be changed.
mimeTypestringA content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
sizeBytesintegerOutput only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.
updateTimestringOutput only. Last update timestamp.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_apis_artifacts_getSELECTapisId, artifactsId, locationsId, projectsIdReturns a specified artifact.
projects_locations_apis_artifacts_listSELECTapisId, locationsId, projectsIdReturns matching artifacts.
projects_locations_apis_deployments_artifacts_getSELECTapisId, artifactsId, deploymentsId, locationsId, projectsIdReturns a specified artifact.
projects_locations_apis_deployments_artifacts_listSELECTapisId, deploymentsId, locationsId, projectsIdReturns matching artifacts.
projects_locations_apis_versions_artifacts_getSELECTapisId, artifactsId, locationsId, projectsId, versionsIdReturns a specified artifact.
projects_locations_apis_versions_artifacts_listSELECTapisId, locationsId, projectsId, versionsIdReturns matching artifacts.
projects_locations_apis_versions_specs_artifacts_getSELECTapisId, artifactsId, locationsId, projectsId, specsId, versionsIdReturns a specified artifact.
projects_locations_apis_versions_specs_artifacts_listSELECTapisId, locationsId, projectsId, specsId, versionsIdReturns matching artifacts.
projects_locations_artifacts_getSELECTartifactsId, locationsId, projectsIdReturns a specified artifact.
projects_locations_artifacts_listSELECTlocationsId, projectsIdReturns matching artifacts.
projects_locations_apis_artifacts_createINSERTapisId, locationsId, projectsIdCreates a specified artifact.
projects_locations_apis_deployments_artifacts_createINSERTapisId, deploymentsId, locationsId, projectsIdCreates a specified artifact.
projects_locations_apis_versions_artifacts_createINSERTapisId, locationsId, projectsId, versionsIdCreates a specified artifact.
projects_locations_apis_versions_specs_artifacts_createINSERTapisId, locationsId, projectsId, specsId, versionsIdCreates a specified artifact.
projects_locations_artifacts_createINSERTlocationsId, projectsIdCreates a specified artifact.
projects_locations_apis_artifacts_deleteDELETEapisId, artifactsId, locationsId, projectsIdRemoves a specified artifact.
projects_locations_apis_deployments_artifacts_deleteDELETEapisId, artifactsId, deploymentsId, locationsId, projectsIdRemoves a specified artifact.
projects_locations_apis_versions_artifacts_deleteDELETEapisId, artifactsId, locationsId, projectsId, versionsIdRemoves a specified artifact.
projects_locations_apis_versions_specs_artifacts_deleteDELETEapisId, artifactsId, locationsId, projectsId, specsId, versionsIdRemoves a specified artifact.
projects_locations_artifacts_deleteDELETEartifactsId, locationsId, projectsIdRemoves a specified artifact.
projects_locations_apis_artifacts_replace_artifactREPLACEapisId, artifactsId, locationsId, projectsIdUsed to replace a specified artifact.
projects_locations_apis_deployments_artifacts_replace_artifactREPLACEapisId, artifactsId, deploymentsId, locationsId, projectsIdUsed to replace a specified artifact.
projects_locations_apis_versions_artifacts_replace_artifactREPLACEapisId, artifactsId, locationsId, projectsId, versionsIdUsed to replace a specified artifact.
projects_locations_apis_versions_specs_artifacts_replace_artifactREPLACEapisId, artifactsId, locationsId, projectsId, specsId, versionsIdUsed to replace a specified artifact.
projects_locations_artifacts_replace_artifactREPLACEartifactsId, locationsId, projectsIdUsed to replace a specified artifact.

SELECT examples

Returns matching artifacts.

SELECT
name,
annotations,
contents,
createTime,
hash,
labels,
mimeType,
sizeBytes,
updateTime
FROM google.apigeeregistry.artifacts
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new artifacts resource.

/*+ create */
INSERT INTO google.apigeeregistry.artifacts (
locationsId,
projectsId,
name,
mimeType,
contents,
labels,
annotations
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ mimeType }}',
'{{ contents }}',
'{{ labels }}',
'{{ annotations }}'
;

REPLACE example

Replaces all fields in the specified artifacts resource.

/*+ update */
REPLACE google.apigeeregistry.artifacts
SET
name = '{{ name }}',
mimeType = '{{ mimeType }}',
contents = '{{ contents }}',
labels = '{{ labels }}',
annotations = '{{ annotations }}'
WHERE
artifactsId = '{{ artifactsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified artifacts resource.

/*+ delete */
DELETE FROM google.apigeeregistry.artifacts
WHERE artifactsId = '{{ artifactsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';