Messaging resource to access the inbox (list, view, mark read, delete) and send messages
List messages for the current user
| name | type | description | default | constraints |
|---|---|---|---|---|
| unread | query | true if only unread messages shall be shown, false for all messages (default) | false | boolean |
| code | condition |
|---|---|
| 200 | Message list is returned. |
| 401 | No valid sid and session secret cookie were provided. |
| 403 | User has insufficient permissions. |
| media type | data type | description |
|---|---|---|
| application/json | GenericResponse (JSON) | response containing the messages |
| application/xml | (custom) |
GET /msg/list
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Set messages to be read
| media type | data type | description |
|---|---|---|
| application/json | MessagesReadRequest (JSON) | request containing the list of messages to be set read |
| application/xml | (custom) |
| code | condition |
|---|---|
| 200 | Messages were set to be read. |
| 401 | No valid sid and session secret cookie were provided. |
| 403 | User has insufficient permissions. |
| media type | data type | description |
|---|---|---|
| application/json | GenericResponse (JSON) | generic response |
| application/xml | (custom) |
POST /msg/read
Content-Type: application/json
Accept: application/json
{
"messages" : [ 12345, 12345 ]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Send a message to users/groups
| media type | data type | description |
|---|---|---|
| application/json | MessageSendRequest (JSON) | request to send messages |
| application/xml | (custom) |
| code | condition |
|---|---|
| 200 | Message was sent. |
| 401 | No valid sid and session secret cookie were provided. |
| 403 | User has insufficient permissions. |
| media type | data type | description |
|---|---|---|
| application/json | GenericResponse (JSON) | generic response |
| application/xml | (custom) |
POST /msg/send
Content-Type: application/json
Accept: application/json
{
"message" : "...",
"translations" : {
"property1" : "...",
"property2" : "..."
},
"parameters" : [ "...", "..." ],
"toGroupId" : [ 12345, 12345 ],
"toUserId" : [ 12345, 12345 ]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Delete message with given ID
| name | type | description | constraints |
|---|---|---|---|
| id | path | message id | int |
| code | condition |
|---|---|
| 204 | Message {id} was deleted. |
| 404 | Message {id} does not exist. |
| 401 | No valid sid and session secret cookie were provided. |
| 403 | User has insufficient permissions. |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) | response |
| application/xml | (custom) |
DELETE /msg/{id}
Accept: application/json
HTTP/1.1 204 No Content
Content-Type: application/json
...