Skip to main content

revisions

Creates, updates, deletes, gets or lists a revisions resource.

Overview

Namerevisions
TypeResource
Idgoogle.apigee.revisions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
contentTypestringThe HTTP Content-Type header value specifying the content type of the body.
datastring (byte)The HTTP request/response body as raw binary.
extensionsarrayApplication specific response metadata. Must be set in the first response for streaming APIs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_apis_revisions_getselectorganizationsId, apisId, revisionsIdformatGets an API proxy revision. To download the API proxy configuration bundle for the specified revision as a zip file, set the format query parameter to bundle. If you are using curl, specify -o filename.zip to save the output to a file; otherwise, it displays to stdout. Then, develop the API proxy configuration locally and upload the updated API proxy configuration revision, as described in updateApiProxyRevision.
organizations_sharedflows_revisions_getselectorganizationsId, sharedflowsId, revisionsIdformatGets a revision of a shared flow. To download the shared flow configuration bundle for the specified revision as a zip file, set the format query parameter to bundle. If you are using curl, specify -o filename.zip to save the output to a file; otherwise, it displays to stdout. Then, develop the shared flow configuration locally and upload the updated sharedFlow configuration revision, as described in updateSharedFlowRevision.
organizations_apis_revisions_deletedeleteorganizationsId, apisId, revisionsIdDeletes an API proxy revision and all policies, resources, endpoints, and revisions associated with it. The API proxy revision must be undeployed before you can delete it.
organizations_sharedflows_revisions_deletedeleteorganizationsId, sharedflowsId, revisionsIdDeletes a shared flow and all associated policies, resources, and revisions. You must undeploy the shared flow before deleting it.
organizations_environments_apis_revisions_deployexecorganizationsId, environmentsId, apisId, revisionsIdoverride, sequencedRollout, serviceAccountDeploys a revision of an API proxy. If another revision of the same API proxy revision is currently deployed, set the override parameter to true to have this revision replace the currently deployed revision. You cannot invoke an API proxy until it has been deployed to an environment. After you deploy an API proxy revision, you cannot edit it. To edit the API proxy, you must create and deploy a new revision. For a request path organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.create on the resource organizations/{org}/environments/{env} * apigee.proxyrevisions.deploy on the resource organizations/{org}/apis/{api}/revisions/{rev} All successful API proxy deployments to Apigee are zero-downtime deployments. Apigee hybrid validates the dependencies between shared flows and API proxies at deployment time. For example, if the Flow Callout policy in an API proxy references a shared flow that either doesn't exist or isn't deployed, the API proxy deployment fails.
organizations_environments_apis_revisions_undeployexecorganizationsId, environmentsId, apisId, revisionsIdsequencedRolloutUndeploys an API proxy revision from an environment. For a request path organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.delete on the resource organizations/{org}/environments/{env} * apigee.proxyrevisions.undeploy on the resource organizations/{org}/apis/{api}/revisions/{rev}
organizations_environments_sharedflows_revisions_deployexecorganizationsId, environmentsId, sharedflowsId, revisionsIdoverride, serviceAccountDeploys a revision of a shared flow. If another revision of the same shared flow is currently deployed, set the override parameter to true to have this revision replace the currently deployed revision. You cannot use a shared flow until it has been deployed to an environment. For a request path organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.create on the resource organizations/{org}/environments/{env} * apigee.sharedflowrevisions.deploy on the resource organizations/{org}/sharedflows/{sf}/revisions/{rev}
organizations_environments_sharedflows_revisions_undeployexecorganizationsId, environmentsId, sharedflowsId, revisionsIdUndeploys a shared flow revision from an environment. For a request path organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.delete on the resource organizations/{org}/environments/{env} * apigee.sharedflowrevisions.undeploy on the resource organizations/{org}/sharedflows/{sf}/revisions/{rev}

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.

NameDatatypeDescription
apisIdstring
environmentsIdstring
organizationsIdstring
revisionsIdstring
sharedflowsIdstring
formatstring
overrideboolean
sequencedRolloutboolean
serviceAccountstring

SELECT examples

Gets an API proxy revision. To download the API proxy configuration bundle for the specified revision as a zip file, set the format query parameter to bundle. If you are using curl, specify -o filename.zip to save the output to a file; otherwise, it displays to stdout. Then, develop the API proxy configuration locally and upload the updated API proxy configuration revision, as described in updateApiProxyRevision.

SELECT
contentType,
data,
extensions
FROM google.apigee.revisions
WHERE organizationsId = '{{ organizationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND revisionsId = '{{ revisionsId }}' -- required
AND format = '{{ format }}';

DELETE examples

Deletes an API proxy revision and all policies, resources, endpoints, and revisions associated with it. The API proxy revision must be undeployed before you can delete it.

DELETE FROM google.apigee.revisions
WHERE organizationsId = '{{ organizationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND revisionsId = '{{ revisionsId }}' --required;

Lifecycle Methods

Deploys a revision of an API proxy. If another revision of the same API proxy revision is currently deployed, set the override parameter to true to have this revision replace the currently deployed revision. You cannot invoke an API proxy until it has been deployed to an environment. After you deploy an API proxy revision, you cannot edit it. To edit the API proxy, you must create and deploy a new revision. For a request path organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.create on the resource organizations/{org}/environments/{env} * apigee.proxyrevisions.deploy on the resource organizations/{org}/apis/{api}/revisions/{rev} All successful API proxy deployments to Apigee are zero-downtime deployments. Apigee hybrid validates the dependencies between shared flows and API proxies at deployment time. For example, if the Flow Callout policy in an API proxy references a shared flow that either doesn't exist or isn't deployed, the API proxy deployment fails.

EXEC google.apigee.revisions.organizations_environments_apis_revisions_deploy 
@organizationsId='{{ organizationsId }}' --required,
@environmentsId='{{ environmentsId }}' --required,
@apisId='{{ apisId }}' --required,
@revisionsId='{{ revisionsId }}' --required,
@override={{ override }},
@sequencedRollout={{ sequencedRollout }},
@serviceAccount='{{ serviceAccount }}';