API Connect

 View Only
  • 1.  Login details for APIC using command prompt

    IBM Champion
    Posted Thu September 23, 2021 05:00 AM
    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
    ------------------------------


  • 2.  RE: Login details for APIC using command prompt

    Posted Fri September 24, 2021 02:57 AM
    Hello,

    you may find the information that you are looking for here:
    https://prichelle.github.io/2020-07-16-APICCLI-start/

    ------------------------------
    Pierre Richelle
    IBM Hybrid Cloud Integration Specialists
    IBM
    +32474681892
    ------------------------------



  • 3.  RE: Login details for APIC using command prompt

    Posted Fri September 24, 2021 03:48 AM
    Edited by Keshav Anand Fri September 24, 2021 03:50 AM
    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


  • 4.  RE: Login details for APIC using command prompt

    IBM Champion
    Posted Fri September 24, 2021 08:56 AM
    Thanks Keshav for the response. I downloaded the CLI from APIManager v10, when i try apic -version command, it shows version as 5 and hence its not allowing to execute command with parameter identity-providers. Its throwing error as identity-providers as not a known param. Any idea why it takes the version as v5 instead of 10?

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------



  • 5.  RE: Login details for APIC using command prompt

    Posted Fri September 24, 2021 09:37 AM
    I am guessing you have apic toolkit for v5 and v10 installed. Have you tried executing the right "apic" with absolute path?

    ------------------------------
    Keshav Anand
    IBM | GSI Lab | IBM Software Labs | Bengaluru, India
    ------------------------------



  • 6.  RE: Login details for APIC using command prompt

    Posted Tue November 08, 2022 09:33 AM
    Hi Keshav,

    I have a CP4I cluster (provisioned by IBM TechZone on ROKS) with APIM instance on it. While trying to login with the above steps you have mentioned, I am able to successfully get the realm details. 

    But am not able to further login to APIM through cli using the username and password provided by techzone. The user provided by the team is an admin user. But using the same user am not able to login to APIM.

    Regards,
    Radhika

    ------------------------------
    Radhika Tharayil
    ------------------------------



  • 7.  RE: Login details for APIC using command prompt

    Posted Wed November 09, 2022 01:14 AM
    The issue is resolved.

    Thank you!

    ------------------------------
    Radhika Tharayil
    ------------------------------