API Connect

Expand all | Collapse all

Login details for APIC using command prompt

  • 1.  Login details for APIC using command prompt

    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 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


  • 3.  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
    ------------------------------



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

    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
    ------------------------------