Skip to main content

apps

Creates, updates, deletes, gets or lists an apps resource.

Overview​

Nameapps
TypeResource
Idgoogle.apigee.apps

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringImmutable. Name of the AppGroup app whose resource name format is of syntax (organizations//appgroups//apps/*).
apiProductsarrayList of API products associated with the AppGroup app.
appGroupstringImmutable. Name of the parent AppGroup whose resource name format is of syntax (organizations//appgroups/).
appIdstringImmutable. ID of the AppGroup app.
attributesarrayList of attributes for the AppGroup app.
callbackUrlstringCallback URL used by OAuth 2.0 authorization servers to communicate authorization codes back to AppGroup apps.
createdAtstring (int64)Output only. Time the AppGroup app was created in milliseconds since epoch.
credentialsarrayOutput only. Set of credentials for the AppGroup app consisting of the consumer key/secret pairs associated with the API products.
keyExpiresInstring (int64)Immutable. Expiration time, in seconds, for the consumer key that is generated for the AppGroup app. If not set or left to the default value of -1, the API key never expires. The expiration time can't be updated after it is set.
lastModifiedAtstring (int64)Output only. Time the AppGroup app was modified in milliseconds since epoch.
scopesarrayScopes to apply to the AppGroup app. The specified scopes must already exist for the API product that you associate with the AppGroup app.
statusstringStatus of the App. Valid values include approved or revoked.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_appgroups_apps_getselectorganizationsId, appgroupsId, appsIdReturns the details for an AppGroup app.
organizations_developers_apps_getselectorganizationsId, developersId, appsIdentity, queryReturns the details for a developer app.
organizations_appgroups_apps_listselectorganizationsId, appgroupsIdpageSize, pageTokenLists all apps created by an AppGroup in an Apigee organization. Optionally, you can request an expanded view of the AppGroup apps. Lists all AppGroupApps in an AppGroup. A maximum of 1000 AppGroup apps are returned in the response if PageSize is not specified, or if the PageSize is greater than 1000.
organizations_apps_getselectorganizationsId, appsIdGets the app profile for the specified app ID.
organizations_developers_apps_listselectorganizationsId, developersIdcount, expand, shallowExpand, startKeyLists all apps created by a developer in an Apigee organization. Optionally, you can request an expanded view of the developer apps. A maximum of 100 developer apps are returned per API call. You can paginate the list of deveoper apps returned using the startKey and count query parameters.
organizations_apps_listselectorganizationsIdapiProduct, apptype, expand, filter, ids, includeCred, keyStatus, pageSize, pageToken, rows, startKey, statusLists IDs of apps within an organization that have the specified app status (approved or revoked) or are of the specified app type (developer or company).
organizations_appgroups_apps_createinsertorganizationsId, appgroupsIdCreates an app and associates it with an AppGroup. This API associates the AppGroup app with the specified API product and auto-generates an API key for the app to use in calls to API proxies inside that API product. The name is the unique ID of the app that you can use in API calls.
organizations_developers_apps_createinsertorganizationsId, developersIdCreates an app associated with a developer. This API associates the developer app with the specified API product and auto-generates an API key for the app to use in calls to API proxies inside that API product. The name is the unique ID of the app that you can use in API calls. The DisplayName (set as an attribute) appears in the UI. If you don't set the DisplayName attribute, the name appears in the UI.
organizations_appgroups_apps_updatereplaceorganizationsId, appgroupsId, appsIdactionUpdates the details for an AppGroup app. In addition, you can add an API product to an AppGroup app and automatically generate an API key for the app to use when calling APIs in the API product. If you want to use an existing API key for the API product, add the API product to the API key using the UpdateAppGroupAppKey API. Using this API, you cannot update the app name, as it is the primary key used to identify the app and cannot be changed. This API replaces the existing attributes with those specified in the request. Include or exclude any existing attributes that you want to retain or delete, respectively. Note: We recommend that you avoid making concurrent update requests for the same resource. Near-simultaneous writes to the same entity can result in conflicts and unexpected behavior. Ensure operations are sequential when modifying a single resource.
organizations_developers_apps_updatereplaceorganizationsId, developersId, appsIdUpdates the details for a developer app. In addition, you can add an API product to a developer app and automatically generate an API key for the app to use when calling APIs in the API product. If you want to use an existing API key for the API product, add the API product to the API key using the UpdateDeveloperAppKey API. Using this API, you cannot update the following: * App name as it is the primary key used to identify the app and cannot be changed. * Scopes associated with the app. Instead, use the ReplaceDeveloperAppKey API. This API replaces the existing attributes with those specified in the request. Include or exclude any existing attributes that you want to retain or delete, respectively. Note: We recommend that you avoid making concurrent update requests for the same resource. Near-simultaneous writes to the same entity can result in conflicts and unexpected behavior. Ensure operations are sequential when modifying a single resource.
organizations_appgroups_apps_deletedeleteorganizationsId, appgroupsId, appsIdDeletes an AppGroup app. Note: The delete operation is asynchronous. The AppGroup app is deleted immediately, but its associated resources, such as app keys or access tokens, may take anywhere from a few seconds to a few minutes to be deleted.
organizations_developers_apps_deletedeleteorganizationsId, developersId, appsIdDeletes a developer app. Note: The delete operation is asynchronous. The developer app is deleted immediately, but its associated resources, such as app keys or access tokens, may take anywhere from a few seconds to a few minutes to be deleted.
organizations_developers_apps_attributesexecorganizationsId, developersId, appsIdUpdates attributes for a developer app. This API replaces the current attributes with those specified in the request.
organizations_developers_apps_generate_key_pair_or_update_developer_app_statusexecorganizationsId, developersId, appsIdactionManages access to a developer app by enabling you to: * Approve or revoke a developer app * Generate a new consumer key and secret for a developer app To approve or revoke a developer app, set the action query parameter to approve or revoke, respectively, and the Content-Type header to application/octet-stream. If a developer app is revoked, none of its API keys are valid for API calls even though the keys are still approved. If successful, the API call returns the following HTTP status code: 204 No Content To generate a new consumer key and secret for a developer app, pass the new key/secret details. Rather than replace an existing key, this API generates a new key. In this case, multiple key pairs may be associated with a single developer app. Each key pair has an independent status (approve or revoke) and expiration time. Any approved, non-expired key can be used in an API call. For example, if you're using API key rotation, you can generate new keys with expiration times that overlap keys that are going to expire. You might also generate a new consumer key/secret if the security of the original key/secret is compromised. The keyExpiresIn property defines the expiration time for the API key in milliseconds. If you don't set this property or set it to -1, the API key never expires. Notes: * When generating a new key/secret, this API replaces the existing attributes, notes, and callback URLs with those specified in the request. Include or exclude any existing information that you want to retain or delete, respectively. * To migrate existing consumer keys and secrets to hybrid from another system, see the CreateDeveloperAppKey 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.

NameDatatypeDescription
appgroupsIdstring
appsIdstring
developersIdstring
organizationsIdstring
actionstring
apiProductstring
apptypestring
countstring (int64)
entitystring
expandboolean
filterstring
idsstring
includeCredboolean
keyStatusstring
pageSizeinteger (int32)
pageTokenstring
querystring
rowsstring (int64)
shallowExpandboolean
startKeystring
statusstring

SELECT examples​

Returns the details for an AppGroup app.

SELECT
name,
apiProducts,
appGroup,
appId,
attributes,
callbackUrl,
createdAt,
credentials,
keyExpiresIn,
lastModifiedAt,
scopes,
status
FROM google.apigee.apps
WHERE organizationsId = '{{ organizationsId }}' -- required
AND appgroupsId = '{{ appgroupsId }}' -- required
AND appsId = '{{ appsId }}' -- required
;

INSERT examples​

Creates an app and associates it with an AppGroup. This API associates the AppGroup app with the specified API product and auto-generates an API key for the app to use in calls to API proxies inside that API product. The name is the unique ID of the app that you can use in API calls.

INSERT INTO google.apigee.apps (
data__apiProducts,
data__appGroup,
data__appId,
data__attributes,
data__callbackUrl,
data__keyExpiresIn,
data__name,
data__scopes,
data__status,
organizationsId,
appgroupsId
)
SELECT
'{{ apiProducts }}',
'{{ appGroup }}',
'{{ appId }}',
'{{ attributes }}',
'{{ callbackUrl }}',
'{{ keyExpiresIn }}',
'{{ name }}',
'{{ scopes }}',
'{{ status }}',
'{{ organizationsId }}',
'{{ appgroupsId }}'
RETURNING
name,
apiProducts,
appGroup,
appId,
attributes,
callbackUrl,
createdAt,
credentials,
keyExpiresIn,
lastModifiedAt,
scopes,
status
;

REPLACE examples​

Updates the details for an AppGroup app. In addition, you can add an API product to an AppGroup app and automatically generate an API key for the app to use when calling APIs in the API product. If you want to use an existing API key for the API product, add the API product to the API key using the UpdateAppGroupAppKey API. Using this API, you cannot update the app name, as it is the primary key used to identify the app and cannot be changed. This API replaces the existing attributes with those specified in the request. Include or exclude any existing attributes that you want to retain or delete, respectively. Note: We recommend that you avoid making concurrent update requests for the same resource. Near-simultaneous writes to the same entity can result in conflicts and unexpected behavior. Ensure operations are sequential when modifying a single resource.

REPLACE google.apigee.apps
SET
data__apiProducts = '{{ apiProducts }}',
data__appGroup = '{{ appGroup }}',
data__appId = '{{ appId }}',
data__attributes = '{{ attributes }}',
data__callbackUrl = '{{ callbackUrl }}',
data__keyExpiresIn = '{{ keyExpiresIn }}',
data__name = '{{ name }}',
data__scopes = '{{ scopes }}',
data__status = '{{ status }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND appgroupsId = '{{ appgroupsId }}' --required
AND appsId = '{{ appsId }}' --required
AND action = '{{ action}}'
RETURNING
name,
apiProducts,
appGroup,
appId,
attributes,
callbackUrl,
createdAt,
credentials,
keyExpiresIn,
lastModifiedAt,
scopes,
status;

DELETE examples​

Deletes an AppGroup app. Note: The delete operation is asynchronous. The AppGroup app is deleted immediately, but its associated resources, such as app keys or access tokens, may take anywhere from a few seconds to a few minutes to be deleted.

DELETE FROM google.apigee.apps
WHERE organizationsId = '{{ organizationsId }}' --required
AND appgroupsId = '{{ appgroupsId }}' --required
AND appsId = '{{ appsId }}' --required
;

Lifecycle Methods​

Updates attributes for a developer app. This API replaces the current attributes with those specified in the request.

EXEC google.apigee.apps.organizations_developers_apps_attributes
@organizationsId='{{ organizationsId }}' --required,
@developersId='{{ developersId }}' --required,
@appsId='{{ appsId }}' --required
@@json=
'{
"attribute": "{{ attribute }}"
}'
;