Skip to main content

Version: 3.9.x

Manage Applications

Applications are containers that developers create to group subscriptions and credentials. Application management APIs are exposed by the standalone Developer Portal backend rather than the Dashboard / Provider Portal Admin API.

Prerequisites

Export the following variables before running the examples in this guide:

export PORTAL_API="https://localhost:4321"
export PORTAL_TOKEN="a7prt-xxxxxxxxxxxxx"
export DEVELOPER_ID="developer-or-organization-id"
  • PORTAL_TOKEN is the bearer token created from Provider Portal > Portal Settings > Tokens.
  • DEVELOPER_ID is sent in the X-Portal-Developer-ID header. In the default Developer Portal implementation, this is the developer or active organization identifier associated with the current session.
  • If you are not running locally, set PORTAL_API to your Developer Portal backend host. The -k flag is required if the backend uses a self-signed TLS certificate.
info

These examples use the standalone Developer Portal backend on port 4321, not the Dashboard / Provider Portal Admin API on port 7443.

The routes in this guide are backend API routes implemented by the standalone Developer Portal backend. The default Developer Portal frontend calls these fixed endpoints, but how your portal obtains the portal token and active developer context can vary by implementation.

Create an Application

curl -k "${PORTAL_API}/api/applications" \
-H "Authorization: Bearer ${PORTAL_TOKEN}" \
-H "X-Portal-Developer-ID: ${DEVELOPER_ID}" \
-H "Content-Type: application/json" \
-d '{
"name": "Mobile App Backend",
"desc": "Application used by the mobile app backend",
"labels": {
"team": "mobile",
"environment": "production"
}
}'

name is required. desc and labels are optional.

List Applications

curl -k "${PORTAL_API}/api/applications" \
-H "Authorization: Bearer ${PORTAL_TOKEN}" \
-H "X-Portal-Developer-ID: ${DEVELOPER_ID}"

Get Application Details

curl -k "${PORTAL_API}/api/applications/{application_id}" \
-H "Authorization: Bearer ${PORTAL_TOKEN}" \
-H "X-Portal-Developer-ID: ${DEVELOPER_ID}"

Update an Application

curl -k -X PUT "${PORTAL_API}/api/applications/{application_id}" \
-H "Authorization: Bearer ${PORTAL_TOKEN}" \
-H "X-Portal-Developer-ID: ${DEVELOPER_ID}" \
-H "Content-Type: application/json" \
-d '{
"name": "Mobile App Backend",
"desc": "Updated application description",
"labels": {
"team": "mobile",
"environment": "staging"
}
}'

Use the request body to replace the application's name, desc, and labels values.

Delete an Application

curl -k -X DELETE "${PORTAL_API}/api/applications/{application_id}" \
-H "Authorization: Bearer ${PORTAL_TOKEN}" \
-H "X-Portal-Developer-ID: ${DEVELOPER_ID}"

Application Structure

Each application belongs to a single active developer context and contains:

ComponentDescription
SubscriptionsLinks to API products that grant the application access to consume APIs.
CredentialsAuthentication tokens (API keys, basic auth, OAuth clients) used to authenticate API requests.
LabelsOptional key-value pairs for categorization and filtering.

API Usage Tracking

Retrieve API call statistics for an application within a time range:

curl -k "${PORTAL_API}/api/applications/api_calls?application_id={application_id}&start_at={unix_start_at}&end_at={unix_end_at}" \
-H "Authorization: Bearer ${PORTAL_TOKEN}" \
-H "X-Portal-Developer-ID: ${DEVELOPER_ID}"

This returns usage metrics that help you understand how the application is consuming your APIs.

Use Unix timestamps in seconds for start_at and end_at.

Application Lifecycle

Applications follow this lifecycle:

  1. Created by a developer in the Developer Portal.
  2. Active while the developer uses it to subscribe to API products and make API calls.
  3. Deleted by the developer or cascaded when the developer account is deleted.

Deleting an application also deletes all its credentials and cancels all its subscriptions. For OAuth (DCR) credentials, the registered clients are also removed from the identity provider.

Additional Resources

API7.ai Logo

The digital world is connected by APIs,
API7.ai exists to make APIs more efficient, reliable, and secure.

Sign up for API7 newsletter

Product

API7 Gateway

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2026. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the Apache Software Foundation