Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Docs for chat.getSnippetedMessageById endpoint (#1486)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto authored and MartinSchoeler committed Nov 21, 2019
1 parent 00fdf24 commit 6e20b1b
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions _data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
- getMessage
- getMessageReadReceipts
- getPinnedMessages
- getSnippetedMessageById
- getStarredMessages
- getThreadMessages
- getThreadsList
Expand Down
1 change: 1 addition & 0 deletions contributing/documentation/documentation-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ Here you can also find what articles are incomplete and missing.
- getMessage
- getMessageReadReceipts
- getPinnedMessages
- getSnippetedMessageById
- getStarredMessages
- getThreadMessages
- getThreadsList
Expand Down
1 change: 1 addition & 0 deletions developer-guides/rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and
| `/api/v1/chat.getMessage` | Retrieves a single chat message. | [Link](chat/getmessage/) |
| `/api/v1/chat.getMessageReadReceipts` | Retrieves message read receipts. | [Link](chat/getmessagereadreceipts/) |
| `/api/v1/chat.getPinnedMessages` | Retrieve pinned messages from a room. | [Link](chat/getpinnedmessages/) |
| `/api/v1/chat.getSnippetedMessageById`| Retrieves snippeted message by id. | [Link](chat/getsnippetedmessagebyid/) |
| `/api/v1/chat.getStarredMessages` | Retrieves starred messages. | [Link](chat/getstarredmessages/) |
| `/api/v1/chat.getThreadMessages` | Retrieves thread's messages. | [Link](chat/getthreadmessages/) |
| `/api/v1/chat.getThreadsList` | Retrieves channel's threads. | [Link](chat/getthreadslist/) |
Expand Down
1 change: 1 addition & 0 deletions developer-guides/rest-api/chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
| `/api/v1/chat.getMessage` | Retrieves a single chat message. | [Link](getmessage/) |
| `/api/v1/chat.getMessageReadReceipts` | Retrieves message read receipts. | [Link](getmessagereadreceipts/) |
| `/api/v1/chat.getPinnedMessages` | Retrieve pinned messages from a room. | [Link](getpinnedmessages/) |
| `/api/v1/chat.getSnippetedMessageById`| Retrieves snippeted message by id. | [Link](getsnippetedmessagebyid/) |
| `/api/v1/chat.getStarredMessages` | Retrieves the starred messages. | [Link](getstarredmessages/) |
| `/api/v1/chat.getThreadMessages`| Retrieves thread's messages. | [Link](getthreadmessages/) |
| `/api/v1/chat.getThreadsList` | Retrieves channel's threads. | [Link](getthreadslist/) |
Expand Down
55 changes: 55 additions & 0 deletions developer-guides/rest-api/chat/getsnippetedmessagebyid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Get Snippeted Message By Id

Retrieve snippeted message by Id.

| URL | Requires Auth | HTTP Method |
| :--- | :--- | :--- |
| `/api/v1/chat.getSnippetedMessageById` | `yes` | `GET` |

## Query Parameters

| Argument | Example | Required | Description |
| :--- | :--- | :--- | :--- |
| `messageId` | `ByehQjC44FwMeiLbX` | Required | The message id |

## Example Call

```bash
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/chat.getSnippetedMessageById?messageId=ByehQjC44FwMeiLbX
```

## Example Result

```json
{
"message": {
"_id": "48sifqi7ezh4ifKaK",
"rid": "GENERAL",
"msg": "```dsfsdfsdf```",
"ts": "2019-10-25T23:26:31.550Z",
"u": {
"_id": "CaevAPDbXN252kyXa",
"username": "marcos.defendi",
"name": "Marcos Defendi"
},
"_updatedAt": "2019-10-25T23:27:51.300Z",
"mentions": [],
"channels": [],
"snippetName": "rr",
"snippeted": true,
"snippetedBy": {
"_id": "CaevAPDbXN252kyXa",
"username": "marcos.defendi"
}
},
"success": true
}
```

## Change Log

| Version | Description |
| :---- | :---- |
| 2.3.0 | Added |

0 comments on commit 6e20b1b

Please sign in to comment.