apis
Creates, updates, deletes, gets or lists an apis resource.
Overview
| Name | apis |
| Type | Resource |
| Id | google.apigeeregistry.apis |
Fields
The following fields are returned by SELECT queries:
- projects_locations_apis_get
- projects_locations_apis_list
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name. |
annotations | object | Annotations 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. |
availability | string | A 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". |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
labels | object | Labels 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. |
recommendedDeployment | string | The recommended deployment of the API. Format: projects/{project}/locations/{location}/apis/{api}/deployments/{deployment} |
recommendedVersion | string | The recommended version of the API. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version} |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name. |
annotations | object | Annotations 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. |
availability | string | A 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". |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
labels | object | Labels 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. |
recommendedDeployment | string | The recommended deployment of the API. Format: projects/{project}/locations/{location}/apis/{api}/deployments/{deployment} |
recommendedVersion | string | The recommended version of the API. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version} |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_locations_apis_get | select | projectsId, locationsId, apisId | Returns a specified API. | |
projects_locations_apis_list | select | projectsId, locationsId | pageToken, pageSize, filter, orderBy | Returns matching APIs. |
projects_locations_apis_create | insert | projectsId, locationsId | apiId | Creates a specified API. |
projects_locations_apis_patch | update | projectsId, locationsId, apisId | updateMask, allowMissing | Used to modify a specified API. |
projects_locations_apis_delete | delete | projectsId, locationsId, apisId | force | Removes 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.
| Name | Datatype | Description |
|---|---|---|
apisId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
apiId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- projects_locations_apis_get
- projects_locations_apis_list
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
;
Returns matching APIs.
SELECT
name,
annotations,
availability,
createTime,
description,
displayName,
labels,
recommendedDeployment,
recommendedVersion,
updateTime
FROM google.apigeeregistry.apis
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- projects_locations_apis_create
- Manifest
Creates a specified API.
INSERT INTO google.apigeeregistry.apis (
data__recommendedVersion,
data__recommendedDeployment,
data__labels,
data__name,
data__displayName,
data__description,
data__availability,
data__annotations,
projectsId,
locationsId,
apiId
)
SELECT
'{{ recommendedVersion }}',
'{{ recommendedDeployment }}',
'{{ labels }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ availability }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apiId }}'
RETURNING
name,
annotations,
availability,
createTime,
description,
displayName,
labels,
recommendedDeployment,
recommendedVersion,
updateTime
;
# Description fields are for documentation purposes
- name: apis
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the apis resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the apis resource.
- name: recommendedVersion
value: "{{ recommendedVersion }}"
description: |
The recommended version of the API. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
- name: recommendedDeployment
value: "{{ recommendedDeployment }}"
description: |
The recommended deployment of the API. Format: `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}`
- name: labels
value: "{{ labels }}"
description: |
Labels 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.
- name: name
value: "{{ name }}"
description: |
Resource name.
- name: displayName
value: "{{ displayName }}"
description: |
Human-meaningful name.
- name: description
value: "{{ description }}"
description: |
A detailed description.
- name: availability
value: "{{ availability }}"
description: |
A 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".
- name: annotations
value: "{{ annotations }}"
description: |
Annotations 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.
- name: apiId
value: "{{ apiId }}"
UPDATE examples
- projects_locations_apis_patch
Used to modify a specified API.
UPDATE google.apigeeregistry.apis
SET
data__recommendedVersion = '{{ recommendedVersion }}',
data__recommendedDeployment = '{{ recommendedDeployment }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__availability = '{{ availability }}',
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
- projects_locations_apis_delete
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 }}'
;