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

Docs for starred messages endpoint #1442

Merged
merged 2 commits into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
- getMessage
- getMessageReadReceipts
- getPinnedMessages
- getStarredMessages
- getThreadMessages
- getThreadsList
- pinMessage
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
- getStarredMessages
- getThreadMessages
- getThreadsList
- pinMessage
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.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/) |
| `/api/v1/chat.ignoreUser` | Ignores an user from a chat. | [Link](chat/ignoreuser/) |
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.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/) |
| `/api/v1/chat.ignoreUser` | Ignores an user from a chat. | [Link](ignoreuser/) |
Expand Down
59 changes: 59 additions & 0 deletions developer-guides/rest-api/chat/getstarredmessages/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Get Starred Messages

Retrieve starred messages. It supports the [Offset, Count, and Sort Query Parameters](../../offset-and-count-and-sort-info/).

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

## Query Parameters

| Argument | Example | Required | Description |
| :--- | :--- | :--- | :--- |
| `roomId` | `ByehQjC44FwMeiLbX` | Required | The room id |

## Example Call

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

## Example Result

```json
{
"messages": [
{
"_id": "ePeoiJQ3Qfc4556TW",
"rid": "GENERAL",
"msg": "fsdfs",
"ts": "2019-10-09T19:17:21.883Z",
"u": {
"_id": "rocketchat.internal.admin.test",
"username": "rocketchat.internal.admin.test",
"name": "RocketChat Internal Admin Test"
},
"_updatedAt": "2019-10-09T19:17:25.196Z",
"mentions": [],
"channels": [],
"starred": [
{
"_id": "rocketchat.internal.admin.test"
}
]
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}
```

## Change Log

| Version | Description |
| :---- | :---- |
| 2.2.0 | Added |