Message
Message Service
Web service endpoints for messages that are replies in a discussion.
Create Content Message
POST /messages/contents/{contentID}
Create a new message with the specified characteristics as a direct reply to the specified content object, which must be a discussion.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
contentID | String | true | ID of the content object (must be a discussion) for which to create a reply |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned Message |
Takes:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | You are not allowed to perform this operation |
404 (Not Found) | The specified parent content object cannot be found |
Upload New Content Message
POST /messages/contents/{contentID}
Create a new message with the specified characteristics as a direct reply to the specified content object, which must be a discussion. Uploaded files will be added to the message as attachments.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
contentID | String | true | ID of the content object (must be a discussion) for which to create a reply |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned Message |
Takes:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | You are not allowed to perform this operation |
404 (Not Found) | The specified parent content object cannot be found |
Create Message
POST /messages
Create a new message with the specified characteristics. The parent
field must
contain the URI of either a discussion for which this is a direct reply, or the URI of a
previous message to which this is a reply.
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned Message |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | You are not allowed to perform this operation |
404 (Not Found) | The specified parent content object cannot be found |
Upload New Message
POST /messages
Create a new message with the specified characteristics. The parent
field must
contain the URI of either a discussion for which this is a direct reply, or the URI of a
previous message to which this is a reply. Uploaded files will be added to the message as
attachments.
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned Message |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | You are not allowed to perform this operation |
404 (Not Found) | The specified parent content object cannot be found |
Create Message Like
POST /messages/{messageID}/likes
Register that the requesting person likes the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be liked |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to access or like this message |
404 (Not Found) | The specified message does not exist |
Create Reply
POST /messages/{messageID}/messages
Create a new message as a reply to an existing message with the specified characteristics.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message being replied to |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned Message |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | If an input field is missing or malformed |
409 (Conflict) | if you attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | if you are not allowed to perform this operation |
404 (Not Found) | if the specified parent content object (or comment) cannot be found |
Upload New Reply
POST /messages/{messageID}/messages
Create a new message as a reply to an existing message with the specified characteristics. Uploaded files will be added to the message as attachments.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message being replied to |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned Message |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | You are not allowed to perform this operation |
404 (Not Found) | The specified parent content object (or comment) cannot be found |
Destroy Message
DELETE /messages/{messageID}
Delete the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be deleted |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified message |
404 (Not Found) | The specified message does not exist |
Destroy Message Like
DELETE /messages/{messageID}/likes
Delete the like of the specified message by the requesting user.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message for which a like is being removed |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is malformed |
409 (Conflict) | You do not currently have a like registered for this message |
403 (Forbidden) | You are not allowed to access or unlike this message |
404 (Not Found) | The specified message does not exist |
Get Content Replies
GET /messages/contents/{contentID}
Return a paginated list of messages for the specified content object, which must be a discussion, optionally limiting the results to direct replies only.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
contentID | String | true | ID of the content object (must be a discussion) for which to return reply messages |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
excludeReplies | Boolean | false | Flag indicating whether to exclude replies (and therefore return direct replies only) (default is false) |
hierarchical | Boolean | false | Flag indicating that replies should be returned in hierarchical order instead of chronological order. (default is true) Since v3.1 |
startIndex | Integer | false | Zero-relative index of the first message to be returned (default is 0) |
count | Integer | false | Maximum number of messages to be returned (default is 25) |
anchor | String | false | optional URI for a message to anchor at. Specifying a anchor will try to return the page containing the anchor. If the anchor could not be found then the first page of messages will be returned. |
fields | String | false | Fields to be returned in the selected messages |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to access the specified content object or its messages |
404 (Not Found) | The specified content object does not exist |
Get Message
GET /messages/{messageID}
Return the specified message with the specified fields.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be returned |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned |
abridged | Boolean | false | Flag indicating that if content.text is requested, it will be abridged
(length shortened, HTML tags removed) |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified comment |
404 (Not Found) | The specified comment does not exist |
Get Message Likes
GET /messages/{messageID}/likes
Return a paginated list of the people who like the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message for which to return liking people |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first person to be returned (default is 0) |
count | Integer | false | Maximum number of people to be returned (default is 25) |
fields | String | false | Fields to be returned on liking people (default is @summary) |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to access this message |
404 (Not Found) | The specified message does not exist |
Get Replies
GET /messages/{messageID}/messages
Return a paginated list of messages that are replies to the specified message, optionally limiting the returned results to direct replies only.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message for which to return reply messages |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
excludeReplies | Boolean | false | Flag indicating whether to exclude replies (and therefore return direct replies only) (default is false) |
hierarchical | Boolean | false | Flag indicating that returned replies should be sorted hierarchically (true) or chronologically (false) |
startIndex | Integer | false | Zero-relative index of the first message to be returned (default is 0) |
count | Integer | false | Maximum number of messages to be returned (default is 25) |
anchor | String | false | optional URI for a message to anchor at. Specifying a anchor will try to return the page containing the anchor. If the anchor could not be found then the first page of messages will be returned. |
fields | String | false | Fields to be returned in the selected messages |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to access the specified message or its replies |
404 (Not Found) | The specified message does not exist |
Update Correct
PUT /messages/{messageID}/correctAnswer
Mark the specified message correct.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be marked correct |
Return Status:
HTTP Status Code | Description |
---|---|
400 (Bad Request) | BadRequestException |
403 (Forbidden) | ForbiddenException |
404 (Not Found) | NotFoundException |
Destroy Correct
DELETE /messages/{messageID}/correctAnswer
Unmark the specified message correct.
Takes:
Return Status:
HTTP Status Code | Description |
---|---|
400 (Bad Request) | BadRequestException |
403 (Forbidden) | ForbiddenException |
404 (Not Found) | NotFoundException |
Update Message
PUT /messages/{messageID}
Update the specified message with the specified characteristics.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be updated |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned entity |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | You are not allowed to access the specified message |
404 (Not Found) | The specified comment does not exist |
Upload Update Message
PUT /messages/{messageID}
Update the specified message with the specified characteristics including the option to replace existing attachments with the ones uploaded in the request.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be updated |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned entity |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a message to a content object that does not support them, or for which replies have been closed |
403 (Forbidden) | You are not allowed to access the specified message |
404 (Not Found) | The specified comment does not exist |