Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.
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
2 changes: 2 additions & 0 deletions 6. Developer Guides/REST API/Channels/addAll.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Adds all of the users of the Rocket.Chat server to the channel.
| Argument | Example | Required | Description |
| :--- | :--- | :--- | :--- |
| `roomId` | `ByehQjC44FwMeiLbX` | Required | The channel's id |
| `activeUsersOnly` | `true` | Optional <br> Default: `false` | Add active users only |

## Example Call
```bash
Expand Down Expand Up @@ -48,4 +49,5 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
## Change Log
| Version | Description |
| :--- | :--- |
| 0.55.0 | Added `activeUsersOnly` param |
| 0.48.0 | Renamed to `channels.addAll` from `channel.addAll` |
1 change: 1 addition & 0 deletions 6. Developer Guides/REST API/Groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ order: 40
# Group Methods
| Url | Short Description | Details Page |
| :--- | :--- | :--- |
| `/api/v1/groups.addAll` | Adds all of the users on the server to a private group. | [Link](addAll.md) |
| `/api/v1/groups.addModerator` | Gives the role of moderator to a user in a group. | [Link](addModerator.md) |
| `/api/v1/groups.addOwner` | Gives the role of owner to a user in a group. | [Link](addOwner.md) |
| `/api/v1/groups.archive` | Archives a private group. | [Link](archive.md) |
Expand Down
52 changes: 52 additions & 0 deletions 6. Developer Guides/REST API/Groups/addAll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
order: 1
---

# Group Add All
Adds all of the users of the Rocket.Chat server to the group.

| URL | Requires Auth | HTTP Method |
| :--- | :--- | :--- |
| `/api/v1/groups.addAll` | `yes` | `POST` |

## Payload
| Argument | Example | Required | Description |
| :--- | :--- | :--- | :--- |
| `roomId` | `ByehQjC44FwMeiLbX` | Required | The channel's id |
| `activeUsersOnly` | `true` | Optional <br> Default: `false` | Add active users only |

## Example Call
```bash
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type: application/json" \
http://localhost:3000/api/v1/channels.addAll \
-d '{ "roomId": "ByehQjC44FwMeiLbX" }'
```

## Example Result
```json
{
"channel": {
"_id": "ByehQjC44FwMeiLbX",
"name": "groupname",
"t": "p",
"usernames": [
"example",
"rocket.cat"
],
"msgs": 0,
"u": {
"_id": "aobEdbYhXfu5hkeqG",
"username": "example"
},
"ts": "2016-05-30T13:42:25.304Z"
},
"success": true
}
```

## Change Log
| Version | Description |
| :--- | :--- |
| 0.55.0 | Added |