Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can I gather a list of registered applications from the command line of the JTS server?

 In version 6.0.3, is there a good way to get a list of registered applications either using the console of the JTS server (e.g., Bash) or else through an API? I need to automate gathering a list of registered applications across a large number of JTS servers, and I would prefer avoiding the web GUI.


For reference, I am essentially looking for the same information that you would find in Server Administration -> Server -> Configuration -> Registered Applications.

0 votes


Accepted answer

Permanent link

Option 1: Use the JTS discovery service

First find the discovery URL from the JTS rootservices document
curl -k 'https://YOUR_JTS_HOSTNAME:9443/jts/rootservices'

Then use the discovery URL to list the registered applications
curl -k 'https://YOUR_JTS_HOSTNAME:9443/jts/discovery?type=http://jazz.net/xmlns/prod/jazz/discovery/1.0/Application'

The pages return XML content and neither should require any authentication.

Option 2: Use the repotools listFriends command

Change to the server directory and run
./repotools-jts.sh -listFriends repositoryURL=https://YOUR_JTS_HOSTNAME:9443/jts adminUserId=YOUR_USERID adminPassword=YOUR_PASSWORD

Or create a file credentials.properties containing these two values

adminUserId=YOUR_USERID
adminPassword=YOUR_PASSWORD
and run
./repotools-jts.sh -listFriends repositoryURL=https://YOUR_JTS_HOSTNAME:9443/jts credentialsFile=credentials.properties

This will output a combined list of registered applications and friends in plain text format. The registered applications will have a valid SCR URL value while the friends will list an SCR URL of null.

Nick Chandler selected this answer as the correct answer

0 votes

Comments

Thanks, Jon. -listFriends is exactly what I was looking for! 


One other answer

Permanent link

I believe the URL /jts/friends will give you what you need. This is a protected resource so you have to log in with the proper credentials to access it. Using a script, it should be the same process as when you try to access other OSLC resources, and you can find plenty of sample codes on this forum.

0 votes

Comments

 Thank you for your response, Donald. Per Jon's recommendation, there is a command-line option that gave me what I needed without having to use OSLC, but I appreciate your response!

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 13 '17, 4:49 p.m.

Question was seen: 3,954 times

Last updated: Mar 14 '17, 10:49 a.m.

Confirmation Cancel Confirm