apis
Creates, updates, deletes, gets or lists an apis
resource.
Overview
Name | apis |
Type | Resource |
Id | google.apigateway.apis |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api} |
createTime | string (google-datetime) | Output only. Created time. |
displayName | string | Optional. Display name. |
labels | object | Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources |
managedService | string | Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API. |
state | string | Output only. State of the API. |
updateTime | string (google-datetime) | Output only. Updated time. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api} |
createTime | string (google-datetime) | Output only. Created time. |
displayName | string | Optional. Display name. |
labels | object | Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources |
managedService | string | Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API. |
state | string | Output only. State of the API. |
updateTime | string (google-datetime) | Output only. Updated time. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , apisId | Gets details of a single Api. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists Apis in a given project and location. |
create | insert | projectsId , locationsId | apiId | Creates a new Api in a given project and location. |
patch | update | projectsId , locationsId , apisId | updateMask | Updates the parameters of a single Api. |
delete | delete | projectsId , locationsId , apisId | Deletes a single Api. |
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 | |
apiId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets details of a single Api.
SELECT
name,
createTime,
displayName,
labels,
managedService,
state,
updateTime
FROM google.apigateway.apis
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required;
Lists Apis in a given project and location.
SELECT
name,
createTime,
displayName,
labels,
managedService,
state,
updateTime
FROM google.apigateway.apis
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new Api in a given project and location.
INSERT INTO google.apigateway.apis (
data__labels,
data__displayName,
data__managedService,
projectsId,
locationsId,
apiId
)
SELECT
'{{ labels }}',
'{{ displayName }}',
'{{ managedService }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apiId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: apis
props:
- name: projectsId
value: string
description: Required parameter for the apis resource.
- name: locationsId
value: string
description: Required parameter for the apis resource.
- name: labels
value: object
description: >
Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
- name: displayName
value: string
description: >
Optional. Display name.
- name: managedService
value: string
description: >
Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
- name: apiId
value: string
UPDATE
examples
- patch
Updates the parameters of a single Api.
UPDATE google.apigateway.apis
SET
data__labels = '{{ labels }}',
data__displayName = '{{ displayName }}',
data__managedService = '{{ managedService }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a single Api.
DELETE FROM google.apigateway.apis
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required;