apis
Creates, updates, deletes, gets or lists an apis
resource.
Overview
Name | apis |
Type | Resource |
Id | google.apigee.apis |
Fields
The following fields are returned by SELECT
queries:
- organizations_apis_get
- organizations_apis_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Name of the API proxy. |
apiProxyType | string | Output only. The type of the API proxy. |
labels | object | User labels applied to this API Proxy. |
latestRevisionId | string | Output only. The id of the most recently created revision for this api proxy. |
metaData | object | Output only. Metadata describing the API proxy. (id: GoogleCloudApigeeV1EntityMetadata) |
readOnly | boolean | Output only. Whether this proxy is read-only. A read-only proxy cannot have new revisions created through calls to CreateApiProxyRevision. A proxy is read-only if it was generated by an archive. |
revision | array | Output only. List of revisions defined for the API proxy. |
space | string | Optional. The id of the space this proxy is associated with. Any IAM policies applied to the space will control access to this proxy. To learn how Spaces can be used to manage resources, read the Apigee Spaces Overview. |
Successful response
Name | Datatype | Description |
---|---|---|
proxies | array |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
organizations_apis_get | select | organizationsId , apisId | Gets an API proxy including a list of existing revisions. | |
organizations_apis_list | select | organizationsId | includeRevisions , includeMetaData , space | Lists the names of all API proxies in an organization. The names returned correspond to the names defined in the configuration files for each API proxy. If the resource has the space attribute set, the response may not return all resources. To learn more, read the Apigee Spaces Overview. |
organizations_apis_create | insert | organizationsId | name , action , validate , space | Creates an API proxy. The API proxy created will not be accessible at runtime until it is deployed to an environment. Create a new API proxy by setting the name query parameter to the name of the API proxy. Import an API proxy configuration bundle stored in zip format on your local machine to your organization by doing the following: * Set the name query parameter to the name of the API proxy. * Set the action query parameter to import . * Set the Content-Type header to multipart/form-data . * Pass as a file the name of API proxy configuration bundle stored in zip format on your local machine using the file form field. Note: To validate the API proxy configuration bundle only without importing it, set the action query parameter to validate . When importing an API proxy configuration bundle, if the API proxy does not exist, it will be created. If the API proxy exists, then a new revision is created. Invalid API proxy configurations are rejected, and a list of validation errors is returned to the client. |
organizations_apis_patch | update | organizationsId , apisId | updateMask | Updates an existing API proxy. |
organizations_apis_delete | delete | organizationsId , apisId | Deletes an API proxy and all associated endpoints, policies, resources, and revisions. The API proxy must be undeployed before you can delete it. | |
organizations_apis_move | exec | organizationsId , apisId | Moves an API proxy to a different space. |
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 | |
organizationsId | string | |
action | string | |
includeMetaData | boolean | |
includeRevisions | boolean | |
name | string | |
space | string | |
updateMask | string (google-fieldmask) | |
validate | boolean |
SELECT
examples
- organizations_apis_get
- organizations_apis_list
Gets an API proxy including a list of existing revisions.
SELECT
name,
apiProxyType,
labels,
latestRevisionId,
metaData,
readOnly,
revision,
space
FROM google.apigee.apis
WHERE organizationsId = '{{ organizationsId }}' -- required
AND apisId = '{{ apisId }}' -- required;
Lists the names of all API proxies in an organization. The names returned correspond to the names defined in the configuration files for each API proxy. If the resource has the space
attribute set, the response may not return all resources. To learn more, read the Apigee Spaces Overview.
SELECT
proxies
FROM google.apigee.apis
WHERE organizationsId = '{{ organizationsId }}' -- required
AND includeRevisions = '{{ includeRevisions }}'
AND includeMetaData = '{{ includeMetaData }}'
AND space = '{{ space }}';
INSERT
examples
- organizations_apis_create
- Manifest
Creates an API proxy. The API proxy created will not be accessible at runtime until it is deployed to an environment. Create a new API proxy by setting the name
query parameter to the name of the API proxy. Import an API proxy configuration bundle stored in zip format on your local machine to your organization by doing the following: * Set the name
query parameter to the name of the API proxy. * Set the action
query parameter to import
. * Set the Content-Type
header to multipart/form-data
. * Pass as a file the name of API proxy configuration bundle stored in zip format on your local machine using the file
form field. Note: To validate the API proxy configuration bundle only without importing it, set the action
query parameter to validate
. When importing an API proxy configuration bundle, if the API proxy does not exist, it will be created. If the API proxy exists, then a new revision is created. Invalid API proxy configurations are rejected, and a list of validation errors is returned to the client.
INSERT INTO google.apigee.apis (
data__contentType,
data__data,
data__extensions,
organizationsId,
name,
action,
validate,
space
)
SELECT
'{{ contentType }}',
'{{ data }}',
'{{ extensions }}',
'{{ organizationsId }}',
'{{ name }}',
'{{ action }}',
'{{ validate }}',
'{{ space }}'
RETURNING
name,
archive,
basepaths,
configurationVersion,
contextInfo,
createdAt,
description,
displayName,
entityMetaDataAsProperties,
hasExtensiblePolicy,
integrationEndpoints,
lastModifiedAt,
policies,
proxies,
proxyEndpoints,
resourceFiles,
resources,
revision,
sharedFlows,
spec,
targetEndpoints,
targetServers,
targets,
teams,
type
;
# Description fields are for documentation purposes
- name: apis
props:
- name: organizationsId
value: string
description: Required parameter for the apis resource.
- name: contentType
value: string
description: >
The HTTP Content-Type header value specifying the content type of the body.
- name: data
value: string
description: >
The HTTP request/response body as raw binary.
- name: extensions
value: array
description: >
Application specific response metadata. Must be set in the first response for streaming APIs.
- name: name
value: string
- name: action
value: string
- name: validate
value: boolean
- name: space
value: string
UPDATE
examples
- organizations_apis_patch
Updates an existing API proxy.
UPDATE google.apigee.apis
SET
data__labels = '{{ labels }}',
data__space = '{{ space }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
apiProxyType,
labels,
latestRevisionId,
metaData,
readOnly,
revision,
space;
DELETE
examples
- organizations_apis_delete
Deletes an API proxy and all associated endpoints, policies, resources, and revisions. The API proxy must be undeployed before you can delete it.
DELETE FROM google.apigee.apis
WHERE organizationsId = '{{ organizationsId }}' --required
AND apisId = '{{ apisId }}' --required;
Lifecycle Methods
- organizations_apis_move
Moves an API proxy to a different space.
EXEC google.apigee.apis.organizations_apis_move
@organizationsId='{{ organizationsId }}' --required,
@apisId='{{ apisId }}' --required
@@json=
'{
"space": "{{ space }}"
}';