Skip to main content

apis

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

Overview

Nameapis
TypeResource
Idgoogle.apigeeregistry.apis

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.
availabilitystringA user-definable description of the availability of this service. Format: free-form, but we expect single words that describe availability, e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
createTimestring (google-datetime)Output only. Creation timestamp.
descriptionstringA detailed description.
displayNamestringHuman-meaningful name.
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 apigeeregistry.googleapis.com/ and cannot be changed.
recommendedDeploymentstringThe recommended deployment of the API. Format: projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}
recommendedVersionstringThe recommended version of the API. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
updateTimestring (google-datetime)Output only. Last update timestamp.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_apis_getselectprojectsId, locationsId, apisIdReturns a specified API.
projects_locations_apis_listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByReturns matching APIs.
projects_locations_apis_createinsertprojectsId, locationsIdapiIdCreates a specified API.
projects_locations_apis_patchupdateprojectsId, locationsId, apisIdupdateMask, allowMissingUsed to modify a specified API.
projects_locations_apis_deletedeleteprojectsId, locationsId, apisIdforceRemoves a specified API and all of the resources that it owns.

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
locationsIdstring
projectsIdstring
allowMissingboolean
apiIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Returns a specified API.

SELECT
name,
annotations,
availability,
createTime,
description,
displayName,
labels,
recommendedDeployment,
recommendedVersion,
updateTime
FROM google.apigeeregistry.apis
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required;

INSERT examples

Creates a specified API.

INSERT INTO google.apigeeregistry.apis (
data__name,
data__displayName,
data__description,
data__availability,
data__recommendedVersion,
data__recommendedDeployment,
data__labels,
data__annotations,
projectsId,
locationsId,
apiId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ availability }}',
'{{ recommendedVersion }}',
'{{ recommendedDeployment }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apiId }}'
RETURNING
name,
annotations,
availability,
createTime,
description,
displayName,
labels,
recommendedDeployment,
recommendedVersion,
updateTime
;

UPDATE examples

Used to modify a specified API.

UPDATE google.apigeeregistry.apis
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__availability = '{{ availability }}',
data__recommendedVersion = '{{ recommendedVersion }}',
data__recommendedDeployment = '{{ recommendedDeployment }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
RETURNING
name,
annotations,
availability,
createTime,
description,
displayName,
labels,
recommendedDeployment,
recommendedVersion,
updateTime;

DELETE examples

Removes a specified API and all of the resources that it owns.

DELETE FROM google.apigeeregistry.apis
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND force = '{{ force }}';