2018-06-27 22:54:08 +02:00
|
|
|
# Get a message's edit history
|
|
|
|
|
2020-04-28 20:00:46 +02:00
|
|
|
{generate_api_description(/messages/{message_id}/history:get)}
|
2018-06-27 22:54:08 +02:00
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-06-27 22:54:08 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{generate_code_example(python)|/messages/{message_id}/history:get|example}
|
|
|
|
|
|
|
|
{tab|curl}
|
2018-06-27 22:54:08 +02:00
|
|
|
|
2019-10-09 11:05:28 +02:00
|
|
|
{generate_code_example(curl)|/messages/{message_id}/history:get|example}
|
2018-06-27 22:54:08 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{end_tabs}
|
2018-06-27 22:54:08 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}/history:get}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Return values
|
|
|
|
|
2020-05-20 11:57:57 +02:00
|
|
|
{generate_return_values_table|zulip.yaml|/messages/{message_id}/history:get}
|
2018-06-27 22:54:08 +02:00
|
|
|
|
|
|
|
Please note that the original message's snapshot only contains the fields
|
|
|
|
`topic`, `content`, `rendered_content`, `timestamp` and `user_id`. This
|
|
|
|
snapshot will be the only one present if the message has never been edited.
|
|
|
|
|
|
|
|
Also note that if a message's content was edited (but not the topic)
|
|
|
|
or the topic was edited (but not the content), the snapshot object
|
|
|
|
will only contain data for the modified fields (e.g. if only the topic
|
|
|
|
was edited, `prev_content`, `prev_rendered_content`, and
|
|
|
|
`content_html_diff` will not appear).
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/messages/{message_id}/history:get|fixture(200)}
|
|
|
|
|
|
|
|
An example JSON response for when the specified message does not exist:
|
|
|
|
|
|
|
|
{generate_code_example|/messages/{message_id}/history:get|fixture(400)}
|