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:

Successful response

NameDatatypeDescription
namestringName of the developer app.
apiProductsarrayList of API products associated with the developer app.
appFamilystringDeveloper app family.
appIdstringID of the developer app. This ID is not user specified but is automatically generated on app creation. appId is a UUID.
attributesarrayList of attributes for the developer app.
callbackUrlstringCallback URL used by OAuth 2.0 authorization servers to communicate authorization codes back to developer apps.
createdAtstring (int64)Output only. Time the developer app was created in milliseconds since epoch.
credentialsarrayOutput only. Set of credentials for the developer app consisting of the consumer key/secret pairs associated with the API products.
developerIdstringID of the developer.
keyExpiresInstring (int64)Expiration time, in milliseconds, for the consumer key that is generated for the developer 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 developer app was modified in milliseconds since epoch.
scopesarrayScopes to apply to the developer app. The specified scopes must already exist for the API product that you associate with the developer app.
statusstringStatus of the credential. Valid values include approved or revoked.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_developers_apps_getselectorganizationsId, developersId, appsIdquery, entityReturns the details for a developer app.
organizations_appgroups_apps_getselectorganizationsId, appgroupsId, appsIdReturns the details for an AppGroup app.
organizations_apps_getselectorganizationsId, appsIdGets the app profile for the specified app ID.
organizations_developers_apps_listselectorganizationsId, developersIdexpand, count, startKey, shallowExpandLists 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_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_listselectorganizationsIdstatus, apptype, includeCred, startKey, rows, expand, ids, keyStatus, apiProduct, pageSize, pageToken, filterLists 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_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_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_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.
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.
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_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_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.
organizations_developers_apps_attributesexecorganizationsId, developersId, appsIdUpdates attributes for a developer app. This API replaces the current attributes with those specified in the request.

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 a developer app.

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

INSERT examples

Creates 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.

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

REPLACE examples

Updates 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.

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

DELETE examples

Deletes 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.

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

Lifecycle Methods

Manages 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.

EXEC google.apigee.apps.organizations_developers_apps_generate_key_pair_or_update_developer_app_status 
@organizationsId='{{ organizationsId }}' --required,
@developersId='{{ developersId }}' --required,
@appsId='{{ appsId }}' --required,
@action='{{ action }}'
@@json=
'{
"appId": "{{ appId }}",
"attributes": "{{ attributes }}",
"callbackUrl": "{{ callbackUrl }}",
"developerId": "{{ developerId }}",
"name": "{{ name }}",
"scopes": "{{ scopes }}",
"status": "{{ status }}",
"keyExpiresIn": "{{ keyExpiresIn }}",
"appFamily": "{{ appFamily }}",
"apiProducts": "{{ apiProducts }}"
}';