Message
Message Service
Web service endpoints for messages that are replies in a discussion.
Jump to
- Create Content Message
- Upload New Content Message
- Create Extended Properties
- Create Message
- Upload New Message
- Create Message Like
- Create Outcome
- Create Reply
- Upload New Reply
- Destroy Extended Properties
- Destroy Message
- Destroy Message Like
- Get Content Replies
- Get Editable Message
- Get Extended Properties
- Get Message
- Get Message Likes
- Get Outcomes
- Get Outcome Types
- Get Replies
- Lock Editable Message
- Update Correct
- Lock Editable Message
- Destroy Correct
- Update Editable Message
- Upload Update Editable Message
- Update Message
- Upload Update Message
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 Extended Properties
POST /messages/{messageID}/extprops
Save a new set of extended properties for a message, and return an entity representing the newly created extended properties. Any previous extended properties for this comment will be completely replaced.
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is malformed or max number of extended properties has been reached |
403 (Forbidden) | You are not allowed to manage ext properties for this message |
404 (Not Found) | The specified comment does not exist |
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 Outcome
POST /messages/{messageID}/outcomes
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the comment for which to create the outcome |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned on the new outcome |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | Ad outcome of this type already exists on the message |
403 (Forbidden) | You are not allowed to access 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 Extended Properties
DELETE /messages/{messageID}/extprops
Delete the existing extended properties for the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message for which the extended properties are to be deleted |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to delete extended properties |
404 (Not Found) | The specified message does not exist |
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 |
---|---|---|---|
filter | Object[] | false | The filter criteria used to select reply messages |
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 Editable Message
GET /messages/{messageID}/editable
Return the specified editable 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 |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | if content is already being edited by another user |
403 (Forbidden) | You are not allowed to access the specified comment |
404 (Not Found) | The specified comment does not exist |
Get Extended Properties
GET /messages/{messageID}/extprops
Return the extended properties for the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message for which to return extended properties |
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to retrieve extended properties |
404 (Not Found) | Specified message 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 Outcomes
GET /messages/{messageID}/outcomes
Return a paginated list of the outcomes for the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message for which to return the outcomes for |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first outcome type to be returned |
count | Integer | false | Maximum number of outcomes to be returned |
fields | String | false | Fields to be returned on outcomes |
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 this message |
404 (Not Found) | The specified message does not exist |
Get Outcome Types
GET /messages/{messageID}/outcomeTypes
Return a paginated list of the possible outcome types for the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message for which to return possible outcome types |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first outcome type to be returned |
count | Integer | false | Maximum number of outcome types to be returned |
fields | String | false | Fields to be returned on OutcomeTypeEntity outcome types |
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 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 |
---|---|---|---|
filter | Object[] | false | The filter criteria used to select messages |
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 |
Lock Editable Message
POST /messages/{messageID}/editable
Attempt to lock the specified message for editing. This method will not fail if the message is already locked. Check the 'editingBy' field in returned entity to see who owns the lock.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be locked |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned entity |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field was malformed |
409 (Conflict) | if content is already being edited by another user |
403 (Forbidden) | You are not allowed to access this message |
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 |
Lock Editable Message
DELETE /messages/{messageID}/editable
Unlock the specified message.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
messageID | String | true | ID of the message to be unlocked |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to access this message |
404 (Not Found) | The specified message does not exist |
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 Editable Message
PUT /messages/{messageID}/editable
Update the specified editable 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 Editable Message
PUT /messages/{messageID}/editable
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 |
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 |