How to Resetting IBM API Connect Developer Portal Admin Passwords

Danang Priabada
3 min readJul 19, 2024

--

This guide will walk you through how to returns the one time login link for the Drupal admin account for your catalog, then you can use it to reset the admin password for a Developer Portal site.

Listing API Connect Pods

First list the running pods in your API Connect environment, use the following command:

oc get po -n cp4i

Here’s an example output of the command (then enter to the www pods):

[root@bastionmwdev ~]# oc get po -n cp4i
NAME READY STATUS RESTARTS AGE
apiconnect-9ecaa918-director-cfc5b54f4-kjk5g 1/1 Running 2 (5d16h ago) 86d
apiconnect-9ecaa918-ingestion-0 1/1 Running 0 20d
apiconnect-9ecaa918-mtls-gw-5bd7bf86c7-xnlw2 1/1 Running 0 86d
apiconnect-9ecaa918-oscron-28659855-679nk 0/1 Completed 0 20d
apiconnect-9ecaa918-storage-0 1/1 Running 0 20d
apiconnect-cd20b410-cd20b410-db-0 2/2 Running 0 20d
apiconnect-cd20b410-cd20b410-www-0 2/2 Running 0 28d
apiconnect-cd20b410-nginx-0 1/1 Running 0 86d
apiconnect-cefeb06f-analytics-proxy-db97c6c67-2xjpf 1/1 Running 2 (20d ago) 20d
apiconnect-cefeb06f-analytics-push-28689315-rr24l 0/1 Completed 0 8m22s
apiconnect-cefeb06f-analytics-ui-79fc74879-lvncl 1/1 Running 0 86d
apiconnect-cefeb06f-apim-7dbbd8c594-h2hb5 1/1 Running 15 (20d ago) 85d
apiconnect-cefeb06f-cefeb06f-db-1 1/1 Running 0 20d
apiconnect-cefeb06f-client-downloads-server-76c49c979d-rcr26 1/1 Running 5 (5d16h ago) 86d
apiconnect-cefeb06f-juhu-6f7b85b5b4-mprgr 1/1 Running 0 20d
apiconnect-cefeb06f-ldap-696c9ccff6-5pzx7 1/1 Running 8 (20d ago) 86d
apiconnect-cefeb06f-lur-776c669dd7-ktmcj 1/1 Running 21 (20d ago) 85d
apiconnect-cefeb06f-natscluster-0 1/1 Running 0 86d
apiconnect-cefeb06f-portal-proxy-65f758bbd9-zc4pg 1/1 Running 0 86d
apiconnect-cefeb06f-taskmanager-c989666fd-bsnlc 1/1 Running 15 (20d ago) 85d
apiconnect-cefeb06f-ui-65d968db64-qddsd 2/2 Running 0 20d
apiconnect-cefeb06f-websocket-proxy-6d8f9d8c66-fnvr7 1/1 Running 0 20d
apiconnect-development-gw-0 1/1 Running 0 10d
platform-dev-ibm-integration-platform-navigator-deploymentm4lpj 2/2 Running 38 (10d ago) 80d

Executing Commands in a Pod

Then you need to execute commands within a pod, you can use the oc exec command :

oc exec -it <www-pod-admin> -c admin bash
oc exec -it apiconnect-cd20b410-cd20b410-www-0 -c admin bash

Listing Sites and Resetting Admin Password

After you enter the pod, you can start to reset the admin password for a Developer Portal site, follow these steps:

List Sites: Inside the pod, run the list_sites command to get a list of all site UUIDs:

bash-4.4$ list_sites
b228c210-7c5b-4ea4-8a90-08aeb6f54e4d.3dadd76f-46fa-4afd-8cee-ded63a568789 => developer.bankabc.co.id/bank-abc/development (INSTALLED)
b228c210-7c5b-4ea4-784d-08aeb6f54e4d.55930e41-fbcf-49a3-81df-109f739a2609 => developer.bankabc.co.id/bank-abc/partner (INSTALLED)

Get Reset Link: Use the site_login_link command with the site's UUID to generate a reset link:

site_login_link <UUID>

This command will output a URL that you can use to reset the admin password for the specified site :

bash-4.4$ site_login_link b228c210-7c5b-4ea4-8a90-08aeb6f54e4d.3dadd76f-46fa-4afd-8cee-ded63a568789
Running: drush -y @b228c210-7c5b-4ea4-8a90-08aeb6f54e4d.3dadd76f-46fa-4afd-8cee-ded63a568789 uli
https://developer.bankabc.co.id/bank-abc/development/user/reset/1/1721359543/IE9nPozbUJ9CT0Uq9v0kKqOKXpvgCzB231PJLbyyfQo/new/login

Access the Reset Link: Open the provided URL in your web browser to complete the password reset process.

Input your new password

You successfully change the admin password

Summary

How to reset the admin password in the API Connect developer portal site without triggering the email ? There could be various usecases for this, example, the portal site admin has moved from the company and you need to reset the password since the password is not known and the admin’s email inbox is not accessible.

https://ibm-apiconnect.github.io/clidocs/docs/v1005/portaladmin/apic_site_login-link

https://www.ibm.com/support/pages/node/7030660

--

--

Danang Priabada
Danang Priabada

Written by Danang Priabada

Red Hat and IBM Product Specialist | JPN : プリアバダ ダナン | CHN : 逹男 | linktr.ee/danangpriabada

No responses yet