How to execute zowe CLI commands when using Zowe APIML
search cancel

How to execute zowe CLI commands when using Zowe APIML

book

Article ID: 405620

calendar_today

Updated On:

Products

Zowe

Issue/Introduction

Is there a  way to make CLI commands always use the apiml profile 

Resolution

There are 2 ways to control which profile to use when using/scripting with the Zowe CLI:

  1. You can change the defaults section to use a given profile for commands that go through zosmf. In this example I am using profilename.zosmf but if you would want to use your profile that has the APIML connection details, you would replace your zosmf default with the profile housing those APIML settings.
  2. You can also type each command with a flag indicating which profile you want to use. So for your example command zowe zosmf check status , you would want to add --zosmf-profile <profile name>  to the end of your command. 

    So running the command as is will give you details for the profile listed as default, but adding a different profile flag to the end, will give you the details for another profile ie: zowe zosmf check status --zosmf-profile profilename.zosmf