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:
NameTypeRequiredDescription
contentIDStringtrueID of the content object (must be a discussion) for which to create a reply
Query Parameters:
NameTypeRequiredDescription
fieldsStringfalseFields to include in the returned Message
Takes:
  • Message describing the entity to be created
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    contentIDStringtrueID of the content object (must be a discussion) for which to create a reply
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to include in the returned Message
    Takes:
  • Multipart of subtype form-data that will include a section with a Message describing the entity to be created and another section for each file being uploaded.
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    fieldsStringfalseFields to include in the returned Message
    Takes:
  • Message describing the entity to be created
  • Retrieves:
  • Message describing the newly created message
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    fieldsStringfalseFields to include in the returned Message
    Takes:
  • Multipart of subtype form-data that will include a section with a Message describing the entity to be created and another section for each file being uploaded.
  • Retrieves:
  • Message describing the newly created message
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message to be liked
    Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message being replied to
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to include in the returned Message
    Takes:
  • Message describing the reply message to be created
  • Retrieves:
  • Message describing the new reply message
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message being replied to
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to include in the returned Message
    Takes:
  • Multipart of subtype form-data that will include a section with a Message describing the reply message to be created and another section for each file being uploaded.
  • Retrieves:
  • Message describing the new reply message
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message to be deleted
    Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message for which a like is being removed
    Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    contentIDStringtrueID of the content object (must be a discussion) for which to return reply messages
    Query Parameters:
    NameTypeRequiredDescription
    excludeRepliesBooleanfalseFlag indicating whether to exclude replies (and therefore return direct replies only) (default is false)
    hierarchicalBooleanfalseFlag indicating that replies should be returned in hierarchical order instead of chronological order. (default is true) Since v3.1
    startIndexIntegerfalseZero-relative index of the first message to be returned (default is 0)
    countIntegerfalseMaximum number of messages to be returned (default is 25)
    anchorStringfalseoptional 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.
    fieldsStringfalseFields to be returned in the selected messages
    Retrieves:
  • Message[] containing the requested messages
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message to be returned
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to be returned
    abridgedBooleanfalseFlag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
    Retrieves:
  • Message containing the specified comment
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message for which to return liking people
    Query Parameters:
    NameTypeRequiredDescription
    startIndexIntegerfalseZero-relative index of the first person to be returned (default is 0)
    countIntegerfalseMaximum number of people to be returned (default is 25)
    fieldsStringfalseFields to be returned on liking people (default is @summary)
    Retrieves:
  • Person[] listing people who like this message
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message for which to return reply messages
    Query Parameters:
    NameTypeRequiredDescription
    excludeRepliesBooleanfalseFlag indicating whether to exclude replies (and therefore return direct replies only) (default is false)
    hierarchicalBooleanfalseFlag indicating that returned replies should be sorted hierarchically (true) or chronologically (false)
    startIndexIntegerfalseZero-relative index of the first message to be returned (default is 0)
    countIntegerfalseMaximum number of messages to be returned (default is 25)
    anchorStringfalseoptional 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.
    fieldsStringfalseFields to be returned in the selected messages
    Retrieves:
  • Message[] listing replies to the specified message
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message to be marked correct
    Return Status:
    HTTP Status CodeDescription
    400 (Bad Request)BadRequestException
    403 (Forbidden)ForbiddenException
    404 (Not Found)NotFoundException

    Destroy Correct

    DELETE /messages/{messageID}/correctAnswer

    Unmark the specified message correct.

    Takes:
  • messageID
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message to be updated
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to include in the returned entity
    Takes:
  • Message containing the updated message
  • Retrieves:
  • Message representing the updated message
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    messageIDStringtrueID of the message to be updated
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to include in the returned entity
    Takes:
  • Multipart of subtype form-data that will include a section with a Message containing the updated message and another section for each file being uploaded.
  • Retrieves:
  • Message representing the updated message
  • Return Status:
    HTTP Status CodeDescription
    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