Hi Santhosh,
I am hoping you have access to your APIM WebGUI.
If so, after you've logged in to APIM WebGUI, copy the URL. Use the part highlighted in bold as your management server (--server).
For example:https://
apiconnect.cp4i-dev-234jweh8h34d8j3d-1111.eu-gb.containers.appdomain.cloud/integration/apis/cp4i/apis/manager
Next, you can use the following command to get realms.
apic identity-providers:list --scope provider --server apiconnect.cp4i-dev-234jweh8h34d8j3d-1111.eu-gb.containers.appdomain.cloud/integration/apis/cp4i/apis --fields title,realm
You can then login using the following command:
apic login --server apiconnect.cp4i-dev-234jweh8h34d8j3d-1111.eu-gb.containers.appdomain.cloud/integration/apis/cp4i/apis --username $MYUSERNAME --password $PASSWORD --realm provider/default-idp-2
More details in IBM Docs:
Using the api commands-Keshav Anand
Original Message:
Sent: Thu September 23, 2021 04:59 AM
From: Santhosh Ramanathan
Subject: Login details for APIC using command prompt
Hi,
I am using APIC v10 on CP4I 2021.2.1 . I want to use the command prompt to login to APIC server, where can I find the server details, realm, username and password for APIC on CP4I.
apic login --server management_server --realm provider/identity_provider --username provider_username --password provider_password
------------------------------
Thanks,
Santhosh Ramanathan
------------------------------