Managing the application lifecycle

By using the application lifecycle capability in IBM® API Connect, the applications that are created in the associated Developer Portal initially has Development status, and can make API calls through the Development endpoints. When application testing is complete, the application developer can request to upgrade the application to Production status. After the request is approved, the application is upgraded can make API calls through Production endpoints.

Note: The Development and Production endpoints must be configured in the API by using the Switch policy.

Configuring API Connect to use the application lifecycle

To configure API Connect to use the application lifecycle capability, you must enable Application Lifecycle in the Catalog settings. For more information, see step 6.d in Creating and configuring catalogs.

Using application lifecycle in the Developer Portal

If application lifecycle is enabled for the Catalog, any application that an application developer registers in the associated Developer Portal initially has Development status, and when you subscribe the application to use an API, it can make API calls only to Development endpoints.

When you have completed your application testing, you can request to upgrade your application to Production status; For more information, see Upgrading a Development application to Production status. After the application upgrade request has been approved, the application can make calls to Production endpoints.

Creating an API that uses switch policy for different endpoints

You can configure the switch policy to create an API that will invoke a different endpoint depending on whether your application is set to Development or Production status. The following example shows how you can create a conditional API using the switch policy:

 assembly:
            execute:
              - switch:
                  version: 2.1.0
                  title: switch
                  case:
                    - condition: $apiCtx().client.app.lifecycle-state = 'PRODUCTION'
                     execute:
                      - invoke:
                          version: 2.0.0
                          title: invoke
                          backend-type: detect
                          header-control:
                            type: blocklist
                            values: []
                          parameter-control:
                            type: allowlist
                            values: []
                          timeout: 60
                          verb: GET
                          chunked-uploads: true
                          persistent-connection: true
                          cache-response: protocol
                          cache-ttl: 900
                          target-url: https://backend.server.example.com/v1/stores/{id}
                   - condition: $apiCtx().client.app.lifecycle-state = 'DEVELOPMENT'
                     execute:
                      - message-template:
                          version: 2.0.0
                          title: message-template
                          template: |-
                            {
                               "id": "12345",
                               "status": "closed"
                             }
For more information on configuring the switch policy to create an API, see Built - in policies.

Approving an application upgrade request

A request to upgrade a Development application to the Production status is approved or declined in the API Manager UI. For more information, see Approving application upgrade requests.
Note: To place the upgrade request, the API must be configured to use two different endpoints depending on the application lifecycle state.