It's all about the answers!

Ask a question

Where can I find more documentation about the new "Server alert messages" REST service?


Guido Schneider (3.4k1486115) | asked Dec 04 '12, 2:28 p.m.
In the Rational Team Concert 4.0.1, New and Noteworthy document is a new functionality described:

Server alert messages

You can use a new REST service to create and manage server alerts. You can use alerts to inform users of important system-wide events, such as scheduled outages or server renames. The messages are displayed in the upper-right corner of the web client, and multiple alerts scroll within the banner.

Where can I find more documentation about this REST service? Idealy with an example. Best would be with and example written with the perl REST functionality you also implemented for administration.


4 answers



permanent link
James Bognar (14334) | answered Dec 11 '12, 10:05 a.m.
JAZZ DEVELOPER

permanent link
Guido Schneider (3.4k1486115) | answered Dec 27 '12, 1:07 p.m.

I wrote a perl script which creates server messages according the javadoc. Unfortunatly the message is not displayed on the WEB-UI nor it is recognized as an active message.

I'm running V.4.0.1 of jts and rtc.

Here what I do:

Step 1) Post a new message:

startDate: 1356630501 = Thu, 27 Dec 2012 17:48:21 GMT
endDate: 1356716501 = Fri, 28 Dec 2012 17:41:41 GMT
 
uri:   https://clmtestserver01.mycompany.com/jts/serverMessages

send jsonmsg: 
{
 "description" : "hello world",
 "startDate" : 1356630501,
 "endDate" : 1356716501
}

response:
{
   "itemId" : "_my_ITlBNEeKfgoTUZ8N5Mw",
   "endDate" : 1356716501,
   "contributorId" : "_T-XVkMeSEeCqLtH8ULpBqw",
   "description" : "hello world",
   "startDate" : 1356630501
}


Step 2) get Messages

uri: https://clmtestserver01.mycompany.com/jts/serverMessages

response:
{
   "identifier" : "itemId",
   "label" : "description",
   "items" : [
      {
         "itemId" : "_my_ITlBNEeKfgoTUZ8N5Mw",
         "endDate" : 1356716501,
         "contributorId" : "_T-XVkMeSEeCqLtH8ULpBqw",
         "description" : "hello world",
         "startDate" : 1356630501
      }
   ]
}

Step 3) get active messages only

uri: https://clmtestserver01.mycompany.com/jts/serverMessages?active=true
response:
{
   "identifier" : "itemId",
   "cacheCreationTime" : 1356630567147,
   "label" : "description",
   "cacheExpireTime" : "9223372036854775807",
   "items" : []
}

Any idea what I'm missing to activate the message, so it is displayed like described in the release notes of V.4.0.1?

If it works, I will provide my perl script here for other to use.


Comments
James Bognar commented Dec 27 '12, 1:21 p.m.
JAZZ DEVELOPER

The times should be in milliseconds.  Try multiplying the times x1000.


Guido Schneider commented Dec 27 '12, 1:31 p.m.

Your a wizard!!

It works. Great. I will post my code soon.


Guido Schneider commented Dec 27 '12, 1:39 p.m.

One additional question: why is the message about an expired client access license not listed in the get response and why can this message not be deleted?
Is there an additional methode to register messages?


Kevin Ramer commented Jan 10 '13, 9:05 a.m.

Would be nice to have this perl script when you get to it.


Sudheer Rugbeer commented Mar 01 '13, 8:29 a.m.

I have successfully managed to get the server message displayed (using a combination of the code from @schneidg and the Firefox REST client to do the actual POST). The message appears on all the application pages except for Requirements Management (/rm). Has anyone else also experienced this?


Matthias Lückl commented Aug 12 '13, 11:04 a.m.

We have recently updated to Jazz RTC version 4.0.3. Until now we were using a self created application for handling the alerts, with the use of REST-Calls.

Now, instead of a JSON String, we get a HTML table as a response value when using the basic REST-URL .../jts/severMessages
Has the API changed? Is there a way to get JSON as a response of the alert messages?

Thanks

showing 5 of 6 show 1 more comments

permanent link
James Bognar (14334) | answered Dec 05 '12, 10:25 a.m.
JAZZ DEVELOPER
We've been holding off creating a Wiki document until the UI for creating server messages has been created.

For now, the REST interface is described in a Javadoc in the source code....
com.ibm.team.repository.service/servermsg/com/ibm/team/repository/service/servermsg/package.html

Comments
Guido Schneider commented Dec 05 '12, 10:42 a.m.

Thank you.

Have you an idea when this UI will be available and what is the capability of it? Do you have a plan item or story where it is described?

I thought I will make an external application based on the REST API to manage this. But if you have planned to bring this in a reasonable time, I would spend my time for others.

regards

Guido


James Bognar commented Dec 05 '12, 11:04 a.m.
JAZZ DEVELOPER

The UI is currently targeted for v4.0.2.  However, the items for 4.0.2 are currently in flux, so it may or may not make it into the release.  It's work item 235343.



Guido Schneider commented Dec 11 '12, 9:38 a.m.

@James: in which source do I find this?




Guido Schneider commented Dec 27 '12, 1:02 p.m.

@jbognar , @bkchulin
I tried to write a external perl script to create such serverMessages. Unfortunatly the messages are not displayed.

More details below in an answer to this question, because of lack of space in a comment.


permanent link
Guido Schneider (3.4k1486115) | answered Jan 25 '13, 11:31 a.m.

Because I do not know how to upload scripts to jazz.net for sharing with others, I have attached my perl script test example and my Javascript test example to the Enhancement request in Jazz.Net.

https://jazz.net/jazz/web/projects/Jazz%20Foundation#action=com.ibm.team.workitem.viewWorkItem&id=235343

Both shows you how to connect to Jazz, list actual server messages, create new messages or delete an existing message.

The perl script is embedded in a cmd file. You need to adapt the path to the perl interpreter at the beginning of the file. Maybe you need also som additional moduls for perl.

The Javascript is embedded in a small HTML Userinterface. It's more or less a translation of the perl script. Some stuff is just hardcoded, but for understanding the user interface it is sufficient


Comments
Kevin Ramer commented May 30 '13, 10:06 a.m.

Any idea why some of my JTS return HTML on the postMessage call ?

e.g.
..logonBrowser : begin : [ https://jts03:9443/jts ][ tds ][ jazzpwd ]
POST https://jts03:9443/jts/j_security_check ==> 408 Request Timeout
Authentication to https://jts03:9443/jts completed in 0.70 Seconds.
..logonBrowser : end
..listServerMessages : begin : [ https://jts03:9443/jts ][ false ][ 0 ]
uri: https://jts03:9443/jts/serverMessages
GET https://jts03:9443/jts/serverMessages ==> 302 Found
** GET https://jts03:9443/jts/authenticated/identity?redirectPath=%2Fjts%2FserverMessages ==> 200 OK
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html>\n\n<...") at post_ServerMessage.pl line 136

The ID is a member of JazzAdmins.


Kevin Ramer commented May 30 '13, 2:30 p.m.

Ok, this might relate to https://jazz.net/library/article/1086/.  The jts that do work are deployed under WebSphere, the others, tomcat.

Your answer


Register or 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.