Skip to main content

artifacts

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

Overview

Nameartifacts
TypeResource
Idgoogle.apigeeregistry.artifacts

Fields

The following fields are returned by SELECT queries:

Successful response

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.
contentsstring (byte)Input 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.
createTimestring (google-datetime)Output 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").
sizeBytesinteger (int32)Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.
updateTimestring (google-datetime)Output only. Last update timestamp.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_apis_versions_specs_artifacts_getselectprojectsId, locationsId, apisId, versionsId, specsId, artifactsIdReturns a specified artifact.
projects_locations_apis_versions_specs_artifacts_listselectprojectsId, locationsId, apisId, versionsId, specsIdpageSize, pageToken, filter, orderByReturns matching artifacts.
projects_locations_apis_versions_artifacts_getselectprojectsId, locationsId, apisId, versionsId, artifactsIdReturns a specified artifact.
projects_locations_apis_deployments_artifacts_getselectprojectsId, locationsId, apisId, deploymentsId, artifactsIdReturns a specified artifact.
projects_locations_apis_versions_artifacts_listselectprojectsId, locationsId, apisId, versionsIdpageSize, pageToken, filter, orderByReturns matching artifacts.
projects_locations_apis_deployments_artifacts_listselectprojectsId, locationsId, apisId, deploymentsIdpageSize, pageToken, filter, orderByReturns matching artifacts.
projects_locations_apis_artifacts_getselectprojectsId, locationsId, apisId, artifactsIdReturns a specified artifact.
projects_locations_apis_artifacts_listselectprojectsId, locationsId, apisIdpageSize, pageToken, filter, orderByReturns matching artifacts.
projects_locations_artifacts_getselectprojectsId, locationsId, artifactsIdReturns a specified artifact.
projects_locations_artifacts_listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByReturns matching artifacts.
projects_locations_apis_versions_specs_artifacts_createinsertprojectsId, locationsId, apisId, versionsId, specsIdartifactIdCreates a specified artifact.
projects_locations_apis_versions_artifacts_createinsertprojectsId, locationsId, apisId, versionsIdartifactIdCreates a specified artifact.
projects_locations_apis_deployments_artifacts_createinsertprojectsId, locationsId, apisId, deploymentsIdartifactIdCreates a specified artifact.
projects_locations_apis_artifacts_createinsertprojectsId, locationsId, apisIdartifactIdCreates a specified artifact.
projects_locations_artifacts_createinsertprojectsId, locationsIdartifactIdCreates a specified artifact.
projects_locations_apis_versions_specs_artifacts_replace_artifactreplaceprojectsId, locationsId, apisId, versionsId, specsId, artifactsIdUsed to replace a specified artifact.
projects_locations_apis_versions_artifacts_replace_artifactreplaceprojectsId, locationsId, apisId, versionsId, artifactsIdUsed to replace a specified artifact.
projects_locations_apis_deployments_artifacts_replace_artifactreplaceprojectsId, locationsId, apisId, deploymentsId, artifactsIdUsed to replace a specified artifact.
projects_locations_apis_artifacts_replace_artifactreplaceprojectsId, locationsId, apisId, artifactsIdUsed to replace a specified artifact.
projects_locations_artifacts_replace_artifactreplaceprojectsId, locationsId, artifactsIdUsed to replace a specified artifact.
projects_locations_apis_versions_specs_artifacts_deletedeleteprojectsId, locationsId, apisId, versionsId, specsId, artifactsIdRemoves a specified artifact.
projects_locations_apis_versions_artifacts_deletedeleteprojectsId, locationsId, apisId, versionsId, artifactsIdRemoves a specified artifact.
projects_locations_apis_deployments_artifacts_deletedeleteprojectsId, locationsId, apisId, deploymentsId, artifactsIdRemoves a specified artifact.
projects_locations_apis_artifacts_deletedeleteprojectsId, locationsId, apisId, artifactsIdRemoves a specified artifact.
projects_locations_artifacts_deletedeleteprojectsId, locationsId, artifactsIdRemoves a specified artifact.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
apisIdstring
artifactsIdstring
deploymentsIdstring
locationsIdstring
projectsIdstring
specsIdstring
versionsIdstring
artifactIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Returns a specified artifact.

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

INSERT examples

Creates a specified artifact.

INSERT INTO google.apigeeregistry.artifacts (
data__name,
data__mimeType,
data__contents,
data__labels,
data__annotations,
projectsId,
locationsId,
apisId,
versionsId,
specsId,
artifactId
)
SELECT
'{{ name }}',
'{{ mimeType }}',
'{{ contents }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apisId }}',
'{{ versionsId }}',
'{{ specsId }}',
'{{ artifactId }}'
RETURNING
name,
annotations,
contents,
createTime,
hash,
labels,
mimeType,
sizeBytes,
updateTime
;

REPLACE examples

Used to replace a specified artifact.

REPLACE google.apigeeregistry.artifacts
SET
data__name = '{{ name }}',
data__mimeType = '{{ mimeType }}',
data__contents = '{{ contents }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND specsId = '{{ specsId }}' --required
AND artifactsId = '{{ artifactsId }}' --required
RETURNING
name,
annotations,
contents,
createTime,
hash,
labels,
mimeType,
sizeBytes,
updateTime;

DELETE examples

Removes a specified artifact.

DELETE FROM google.apigeeregistry.artifacts
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND specsId = '{{ specsId }}' --required
AND artifactsId = '{{ artifactsId }}' --required;