external_apis
Creates, updates, deletes, gets or lists an external_apis
resource.
Overview
Name | external_apis |
Type | Resource |
Id | google.apihub.external_apis |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Format: projects/{project}/locations/{location}/externalApi/{externalApi} . |
attributes | object | Optional. The list of user defined attributes associated with the Version resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute} . The value is the attribute values associated with the resource. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | Optional. Description of the external API. Max length is 2000 characters (Unicode Code Points). |
displayName | string | Required. Display name of the external API. Max length is 63 characters (Unicode Code Points). |
documentation | object | Optional. Documentation of the external API. (id: GoogleCloudApihubV1Documentation) |
endpoints | array | Optional. List of endpoints on which this API is accessible. |
paths | array | Optional. List of paths served by this API. |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Format: projects/{project}/locations/{location}/externalApi/{externalApi} . |
attributes | object | Optional. The list of user defined attributes associated with the Version resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute} . The value is the attribute values associated with the resource. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | Optional. Description of the external API. Max length is 2000 characters (Unicode Code Points). |
displayName | string | Required. Display name of the external API. Max length is 63 characters (Unicode Code Points). |
documentation | object | Optional. Documentation of the external API. (id: GoogleCloudApihubV1Documentation) |
endpoints | array | Optional. List of endpoints on which this API is accessible. |
paths | array | Optional. List of paths served by this API. |
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 |
---|---|---|---|---|
get | select | projectsId , locationsId , externalApisId | Get details about an External API resource in the API hub. | |
list | select | projectsId , locationsId | pageSize , pageToken | List External API resources in the API hub. |
create | insert | projectsId , locationsId | externalApiId | Create an External API resource in the API hub. |
patch | update | projectsId , locationsId , externalApisId | updateMask | Update an External API resource in the API hub. The following fields can be updated: * display_name * description * documentation * endpoints * paths The update_mask should be used to specify the fields being updated. |
delete | delete | projectsId , locationsId , externalApisId | Delete an External API resource in the API hub. |
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 |
---|---|---|
externalApisId | string | |
locationsId | string | |
projectsId | string | |
externalApiId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get details about an External API resource in the API hub.
SELECT
name,
attributes,
createTime,
description,
displayName,
documentation,
endpoints,
paths,
updateTime
FROM google.apihub.external_apis
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND externalApisId = '{{ externalApisId }}' -- required;
List External API resources in the API hub.
SELECT
name,
attributes,
createTime,
description,
displayName,
documentation,
endpoints,
paths,
updateTime
FROM google.apihub.external_apis
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Create an External API resource in the API hub.
INSERT INTO google.apihub.external_apis (
data__name,
data__displayName,
data__description,
data__endpoints,
data__paths,
data__documentation,
data__attributes,
projectsId,
locationsId,
externalApiId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ endpoints }}',
'{{ paths }}',
'{{ documentation }}',
'{{ attributes }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ externalApiId }}'
RETURNING
name,
attributes,
createTime,
description,
displayName,
documentation,
endpoints,
paths,
updateTime
;
# Description fields are for documentation purposes
- name: external_apis
props:
- name: projectsId
value: string
description: Required parameter for the external_apis resource.
- name: locationsId
value: string
description: Required parameter for the external_apis resource.
- name: name
value: string
description: >
Identifier. Format: `projects/{project}/locations/{location}/externalApi/{externalApi}`.
- name: displayName
value: string
description: >
Required. Display name of the external API. Max length is 63 characters (Unicode Code Points).
- name: description
value: string
description: >
Optional. Description of the external API. Max length is 2000 characters (Unicode Code Points).
- name: endpoints
value: array
description: >
Optional. List of endpoints on which this API is accessible.
- name: paths
value: array
description: >
Optional. List of paths served by this API.
- name: documentation
value: object
description: >
Optional. Documentation of the external API.
- name: attributes
value: object
description: >
Optional. The list of user defined attributes associated with the Version resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource.
- name: externalApiId
value: string
UPDATE
examples
- patch
Update an External API resource in the API hub. The following fields can be updated: * display_name * description * documentation * endpoints * paths The update_mask should be used to specify the fields being updated.
UPDATE google.apihub.external_apis
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__endpoints = '{{ endpoints }}',
data__paths = '{{ paths }}',
data__documentation = '{{ documentation }}',
data__attributes = '{{ attributes }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND externalApisId = '{{ externalApisId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
attributes,
createTime,
description,
displayName,
documentation,
endpoints,
paths,
updateTime;
DELETE
examples
- delete
Delete an External API resource in the API hub.
DELETE FROM google.apihub.external_apis
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND externalApisId = '{{ externalApisId }}' --required;