How to fetch all the JDBC connection details in IS page

HI experts,

Could someone please guide , is there a option to fetch all the JDBC connection details. I am working for some DB related activity, so i need to collect all the DB user details. But its taking too much of time to open the every connection and collecting the details

Best Regards
K M, Varun

Hi Varun,

please check the IS Built-In-Services Reference for your IS version for the ART-Folder.
This one contains services to list all connections and then to get their details (except password for security reasons).

Regards,
Holger

If you are on 10.7 or newer version of IS, please have a look @ REST Admin API. You can get underlying Swagger doc by invoking http://localhost:5555/admin/swagger/integrationServer. Please have a look @ /admin/jdbc/pool/ resource.

Hi ,

Thanks for the response. What should be the input for that service , I have tried with the adapter name , but the result is null. Also i tried with the String as input , same result as Null .
Please assist me .

Use the service “pub.art:listRegisteredAdapters” to list all the available adapter types.
That way you can copy/paste the one you want.
regards,
John.

2 Likes

But it wont list the JDBC adapter connections … it fetched juts type of connections like JDBC and SAP

Best Regards
K M, Varun

Note that your listAdapterServices’ input is “adapterTypeName”, which is the type of the adapter - SAP or JDBC, etc. Each type has a specific keyword, which is what John pointed you to.

You take the output of listRegisteredAdapters (which provides you the keywords of the types that are available on your IS, viz., “WmSAP” or “JDBCAdapter”) and use in the listAdapterServices service as input. You will now get the list of all adapters for that type, i.e., SAP or JDBC.

KM

2 Likes

Hi Varun,

If you are using webMethods 10.5 or higher you can use the Adapter Administration REST APIs to get the list of connections and connection details for each connection for an Adapter. Please refer to the Adapters Runtime Users Guide Chapter 6 Adapter Administration APIs Connections operations for more details @ https://documentation.softwareag.com/webmethods/adapters_estandards/Adapters/Adapter_Runtime/Adapter_Runtime_10-5/10-5_Adapter_Runtime_Users_Guide.pdf

Below is the list of API calls to be made for your requirement:

Get the List of Adapters installed on an IS with their name and adapter type name - http://{{host}:{{port}}/admin/adapters/

Get List of Connections for a particular adapter - http://{{host}}:{{port}}/admin/adapters/connection/{{adapterTypeName}}/

Get the Connection Details of an Adapter Connection - http://{{host}}:{{port}}/admin/adapters/connection/{{adapterTypeName}}/{{connectionAlias}}/

In you case the adapter type name will be JDBCAdapter.

regards,
Suresh. G

1 Like

@John_Carter4 @Venkata_Kasi_Viswanath_Mugada1 Thank you so much for help i can list all the connections now.

HI @Suresh_Ganta ,

Thank you for response. I am using 10.5 version and i tried like this
https://{host}:{port}/admin/JDBCAdapter. I am getting an error like below mentioned . Could you please suggest

message [ISS.0030.0030] You must provide credentials to access the Administrator API.
stackTrace com.softwareag.is.admin.AdminAPIException: [ISS.0030.0030] You must provide credentials to access the Administrator API. at wm.admin.controller.checkPermissions(controller.java:209) at wm.admin.controller.execute(controller.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:411) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:747) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56) at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:345) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:617) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:426) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:384) at com.wm.app.b2b.server.HTTPInvokeHandler._process(HTTPInvokeHandler.java:278) at com.softwareag.is.admin.AdminHandler.process(AdminHandler.java:45) at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:223) at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:391) at com.wm.util.pool.PooledThread.run(PooledThread.java:134) at java.lang.Thread.run(Thread.java:748) Caused by: com.wm.app.b2b.server.AccessException: Access Denied … 25 more

Hi @Venkata_Kasi_Viswanath_Mugada1 @John_Carter4 ,

It showing some hundreds of services. But actually i am looking for only [webMethods Adapter for JDBC].
It would be better if it fetches only connection and properties (server name, user , db name, port …) details.

Built-in Services

This shows hundreds of services because you are using “listAdapterServices”.

For connections you must use “pub.art.connection:listAdapterConnections” This will also provide the basic info for ALL connections (link), and not the properties that you need. However, there isn’t a supported service (i.e., in WmART or WmPublic) to fetch the connection properties, but there is an option in WmRoot which is not recommended.

Administrator API

You are better off using the Administrator API and your error message clearly indicates that it needs credentials; read this (link).

Are you invoking the API via browser?
Use a client like Postman or try developing an IS service, so you can pass the credentials easily and test.

KM

1 Like

Thank you so much for the information. Yes, am invoking via browser.
I am not aware on the postman , i will try developing an IS service.

If you’d like to test a GET operation out on the browser, you can do as follows -

  1. Open your IS page on the browser and authenticate yourself with the Administrator user (or a similar Admin-privileged user)
  2. AFTER you’re logged in, either change the URL or open a new tab and paste your target URL

Example -

This is the Administrator API, which Suresh has explained above -
http://localhost:5555/admin/adapters/connection/JDBCAdapter/replaceYourJDBCConnectionNamespace

Caveat - The connection’s username and password will be displayed in clear-text (I’ve sanitized them in the screenshot), so exercise due caution

KM

3 Likes

Thank you so much for the guidance. It worked, now i can fetch all the connection details.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.