Managing Applications

Add Applications in an environment

You can add Applications via the Developer Portal. However, WSO2 API Controller (apictl) allows you to create Applications without using the Developer Portal. For more information on adding Applications, see Migrating Apps to Different Environments.

Get Applications in an environment

Follow the instructions below to display a list of Applications in an environment using apictl:

  1. Make sure that the WSO2 API Manager (WSO2 API-M) 4.0.0 version is started and that the 4.0.0 version of apictl is set up.
    For more information, see Download and Initialize the apictl.
  2. Log in to the WSO2 API-M in the environment by following the instructions in Login to an Environment.
  3. Run the corresponding apictl command below to get (list) Applications in an environment.

    • Command

      apictl get apps -e <environment> 
      apictl get apps --environment <environment> 
      apictl get apps --environment <environment> --owner <application owner> 

      Info

      Flags:

      • Required :
        --environment or -e : Environment to be searched
      • Optional :
        --owner or -o : Owner of the Application
        --limit or -l : Maximum number of applications to return (Default 25)

      Example

      apictl get apps -e dev 
      apictl get apps --environment production 
      apictl get apps --environment production --owner sampleUser --limit 15 

    • Response

      ID                                     NAME                OWNER       STATUS     GROUP ID
      29b4fcc6-05a4-42a7-aa64-f1a1b8a7b979   DefaultApplication  admin       APPROVED 
      36d51e55-3f1e-4f85-86ee-8fe73b0c8adff  SampleApplication   sampleUser  APPROVED   orgA

      Tip

      When using the apictl get apps -e dev command, you can either specify -o (--owner) flag or not.

      • When someone has invoked the command without specifying the owner flag, it will list all the applications in that environment which belongs to the tenant that the currently logged in user belongs.
      • When someone has invoked the command by specifying the owner flag, it will list all the applications belongs to that particular owner in that environment.

      Note

      Output of the get apps command can be formatted with Go Templates. For more information on formatting the get commands, see Formatting the outputs of get commands.

      Note

      apictl list apps command has been deprecated from apictl 4.0.0 onwards. Instead use apictl get apps as shown above.

Delete an Application in an environment

  1. Make sure that the WSO2 API-M 4.0.0 version is started and that the 4.0.0 version of apictl is set up.
    For more information, see Download and Initialize the apictl.
  2. Log in to the WSO2 API-M in the environment by following the instructions in Login to an Environment.
  3. Run the corresponding apictl command below to get (list) Applications in an environment.

    • Command

       apictl delete app -n <application name> -e <environment> 
      apictl delete app -name <application name> --environment <environment> 
      apictl delete app --name <application name> --environment <environment> --owner <application owner> 

      Info

      Flags:

      • Required :
        --environment or -e : Environment from which the Application should be deleted
        --name or -n : Name of the Application to be deleted
      • Optional :
        --owner or -o : Owner of the Application to be deleted

      Example

      apictl delete app -n DefaultApplication -e dev 
      apictl delete app --name DefaultApplication --environment production 
      apictl delete app --name DefaultApplication --environment production --owner sampleUser 

    • Response

      DefaultApplication Application deleted successfully!
Top