Create an application¶
What happens
A developer creates an application in the Developer Portal. The application represents their software, such as a mobile app. APIM makes sure the developer has a subscriber row, then stores the application with its rate-limit tier, token type and any custom attributes.
Who: Developer Portal (API consumer) · Tables written: AM_SUBSCRIBER (first time only), AM_APPLICATION, AM_APPLICATION_ATTRIBUTES (if attributes are given), AM_APPLICATION_GROUP_MAPPING (if sharing is on), AM_WORKFLOWS (if approval is on) · Tables read: AM_POLICY_APPLICATION
The flow at a glance¶
This diagram shows the rows created when a developer clicks Save on a new application.
sequenceDiagram
actor Dev as Developer
participant Portal as Dev Portal
participant DB as Database
Dev->>Portal: Create "PizzaApp", tier Unlimited
Portal->>DB: find or insert AM_SUBSCRIBER (+ DefaultApplication)
Portal->>DB: insert AM_APPLICATION
Portal->>DB: insert AM_APPLICATION_ATTRIBUTES (if any)
Portal->>DB: insert AM_WORKFLOWS (if approval on)
Portal->>DB: status APPROVED (or CREATED while pending)
Step by step¶
-
Subscriber →
AM_SUBSCRIBER. If this is the user's first action in the portal, APIM inserts a row. APIM also creates the user's DefaultApplication automatically at this point. See Setup & first user. -
Application →
AM_APPLICATION.APPLICATION_IDNAMESUBSCRIBER_IDAPPLICATION_TIERAPPLICATION_STATUSTOKEN_TYPEUUIDGROUP_ID1 DefaultApplication1 UnlimitedAPPROVEDJWT2f17…''(empty string)2 PizzaApp1 UnlimitedAPPROVEDJWTc798…NULLThe DefaultApplication has the description "This is the default application".
SUBSCRIBER_IDis a real FK toAM_SUBSCRIBERwithON DELETE RESTRICT: the owner can't be deleted while they own apps.(NAME, SUBSCRIBER_ID)is unique, so one user can't have two apps with the same name.UUIDis unique and is the ID used in REST APIs.APPLICATION_TIERlinks toAM_POLICY_APPLICATION.NAMEfor the same tenant (logical link, no FK). It limits the total calls from this app across all APIs.TOKEN_TYPEisJWT(the 3.x default for new apps) orOAUTH(opaque tokens, for older apps).APPLICATION_STATUSisCREATEDwhile waiting for approval, thenAPPROVED(orREJECTED).
-
Custom attributes →
AM_APPLICATION_ATTRIBUTES. Extra fields defined by the admin, such as "External Reference Id".APPLICATION_IDNAMEVALUETENANT_ID2 External Reference IdMOB-001-1234 Rows are written here only when the application is created with attributes.
FK to
AM_APPLICATIONwithON DELETE CASCADE. -
Sharing with a group (optional) →
AM_APPLICATION_GROUP_MAPPING. If application sharing is enabled, for example by organization claim, each group that can see the app is a row (APPLICATION_ID,GROUP_ID,TENANT). FK withON DELETE CASCADE. The older single-valueAM_APPLICATION.GROUP_IDcolumn is kept for backward compatibility. -
Approval (optional) →
AM_WORKFLOWSwithWF_TYPE = 'AM_APPLICATION_CREATION'andWF_REFERENCE= theAPPLICATION_IDas a string ('3'in the test run). The app staysCREATEDuntil an admin approves it. See Approval workflows.
What gets cleaned up¶
Deleting an application cascades to its attributes and group mappings. But AM_SUBSCRIPTION, AM_APPLICATION_KEY_MAPPING and AM_APPLICATION_REGISTRATION block the delete (RESTRICT), so APIM removes subscriptions and keys first. See Revoke & delete.
Try it¶
This query lists every application with its owner and its application-level tier limits.
SELECT s.USER_ID AS owner, a.NAME, a.APPLICATION_TIER, a.TOKEN_TYPE,
a.APPLICATION_STATUS, p.QUOTA, p.UNIT_TIME, p.TIME_UNIT
FROM AM_APPLICATION a
JOIN AM_SUBSCRIBER s ON s.SUBSCRIBER_ID = a.SUBSCRIBER_ID
LEFT JOIN AM_POLICY_APPLICATION p
ON p.NAME = a.APPLICATION_TIER AND p.TENANT_ID = s.TENANT_ID;
Related domains: Applications & subscriptions · Throttling policies
Different in 4.x
In 4.x, AM_APPLICATION adds an ORGANIZATION column (and SHARED_ORGANIZATION in newer releases), and the unique key becomes (NAME, SUBSCRIBER_ID, ORGANIZATION). See Create an application (4.x).