diff --git a/6. Developer Guides/REST API/Channels/addAll.md b/6. Developer Guides/REST API/Channels/addAll.md index fbc25a0da3..63571e2e13 100644 --- a/6. Developer Guides/REST API/Channels/addAll.md +++ b/6. Developer Guides/REST API/Channels/addAll.md @@ -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
Default: `false` | Add active users only | ## Example Call ```bash @@ -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` | diff --git a/6. Developer Guides/REST API/Groups/README.md b/6. Developer Guides/REST API/Groups/README.md index c5649705c7..b850c334ff 100644 --- a/6. Developer Guides/REST API/Groups/README.md +++ b/6. Developer Guides/REST API/Groups/README.md @@ -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) | diff --git a/6. Developer Guides/REST API/Groups/addAll.md b/6. Developer Guides/REST API/Groups/addAll.md new file mode 100644 index 0000000000..46752156b5 --- /dev/null +++ b/6. Developer Guides/REST API/Groups/addAll.md @@ -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
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 |