Changes between Version 9 and Version 10 of NewTestbedAPISpec
- Timestamp:
- Jul 26, 2013 10:57:22 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewTestbedAPISpec
v9 v10 229 229 A notification is a short message from another user or the testbed asking a user to take an action (add someone to a project, update a password before expiration) or communicating other information to the user (testbed downtime, etc). A web interface will want to present these to a user. 230 230 231 Each notification has a set of flags that define its state. Currently there are 2 232 233 * '''READ''' bit 0 (low order bit) true if the user has read the notification 234 * '''URGENT''' bit 1 true if the testbed considers this urgent information 235 236 The user is free to change this state using the markNotifications call. Note that notifications are per-user. A user who clears the READ or URGENT bit does not clear the bit for other recipients of the notification. 237 231 238 232 239 * '''Service:''' Users … … 236 243 * FirstDate - an optional date. If present only show notifications after that date 237 244 * LastDate - an optional date. If present only show notifications before that date 238 * OnlyUnread - a flag. If true, show only unread notifications 245 * Flags - a 32-bit integer of flags. Only notifications that match the flags state after the mask is applied are returned 246 * Mask - A 32-bit mask of the bits to consider in the flags field. 239 247 * '''Return Values:''' 240 248 * A list of responses each containing 241 249 * ID - a 64-bit integer identifying the notification 242 * IsRead - a flag indicating that the message has been read by this user250 * Flags - the message state 243 251 * Sent - the date the notification was issued 244 252 * Text - the text of the notification 245 253 246 The filtering variables are all applied if given. If OnlyUnread is true and FirstDate and LastDate are both given, only unread notifications between those dates are returned. 247 248 * '''Service:''' Users 249 * '''Operation:''' markNotificationsRead 254 The filtering variables are all applied if given. 255 256 The mask and flags variable define the state a user is searching for. If a bit is set in both mask and flags, only messages with that bit set are returned. Similarly if a bit is clear in flags and set in mask, only messages with that bit clear will be returned. 257 258 To be concrete: a user who wants to retrieve all unread messages (urgent or not) should send a flags field with the READ bit clear and a mask with the READ bit set. To retrieve only unread urgent messages, the flags should have READ clear and URGENT set, and both READ and URGENT set in the mask. 259 260 261 * '''Service:''' Users 262 * '''Operation:''' markNotifications 250 263 * '''Input Parameters:''' 251 264 * Userid - the user's identity to gather notifications 252 * Notifications - an array of 64-bit integers, the notifications to mark read 265 * Ids - an array of 64-bit integers, the identifiers of the notifications to mark 266 * Flags - a 32-bit integer of flags to change. Notifications will have their flags field set to the value in this field if the corresponding mask bit is set. 267 * Mask - A 32-bit mask of the bits to consider in the flags field. 268 * '''Return Values:''' 269 * None 270 271 Administrators can send notifications, for example to announce testbed events. The call to do so is: 272 273 * '''Service:''' Users 274 * '''Operation:''' sendNotifications 275 * '''Input Parameters:''' 276 * Users - a list of uids to receive the notification 277 * Projects - a list of projects to receive the notification. All users in the project will receive it 278 * Flags - the initial notification state for each user 279 * Text - the content of the notification 253 280 * '''Return Values:''' 254 281 * None