apis
Creates, updates, deletes, gets or lists a apis
resource.
Overview
Name | apis |
Type | Resource |
Id | google.apigee.apis |
Fields
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 | Metadata common to many entities in this API. |
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. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
organizations_apis_get | SELECT | apisId, organizationsId | Gets an API proxy including a list of existing revisions. |
organizations_apis_list | SELECT | organizationsId | 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. |
organizations_apis_create | INSERT | organizationsId | 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_delete | DELETE | apisId, organizationsId | 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_patch | UPDATE | apisId, organizationsId | Updates an existing API proxy. |
SELECT
examples
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.
SELECT
name,
apiProxyType,
labels,
latestRevisionId,
metaData,
readOnly,
revision
FROM google.apigee.apis
WHERE organizationsId = '{{ organizationsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new apis
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.apigee.apis (
organizationsId,
contentType,
data,
extensions
)
SELECT
'{{ organizationsId }}',
'{{ contentType }}',
'{{ data }}',
'{{ extensions }}'
;
- name: your_resource_model_name
props:
- name: contentType
value: string
- name: data
value: string
- name: extensions
value:
- object
UPDATE
example
Updates a apis
resource.
/*+ update */
UPDATE google.apigee.apis
SET
labels = '{{ labels }}'
WHERE
apisId = '{{ apisId }}'
AND organizationsId = '{{ organizationsId }}';
DELETE
example
Deletes the specified apis
resource.
/*+ delete */
DELETE FROM google.apigee.apis
WHERE apisId = '{{ apisId }}'
AND organizationsId = '{{ organizationsId }}';