Where can I find more documentation about the new "Server alert messages" REST service?
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
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.
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
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
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/serverMessagessend 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.