diff --git a/_data/toc.yml b/_data/toc.yml index a61e07ecb6..b338ad2ae3 100644 --- a/_data/toc.yml +++ b/_data/toc.yml @@ -305,7 +305,6 @@ - users - Miscellaneous: - info - - settings.oauth - statistics - statistics.list - Rooms: @@ -316,6 +315,7 @@ - Settings: - get - get-by-id + - oauth - public - service-configuration - update diff --git a/contributing/documentation/documentation-map/README.md b/contributing/documentation/documentation-map/README.md index ff5873886d..35d77e5a29 100644 --- a/contributing/documentation/documentation-map/README.md +++ b/contributing/documentation/documentation-map/README.md @@ -350,7 +350,6 @@ Here you can also find what articles are incomplete and missing. - users - Miscellaneous: - info - - settings.oauth - statistics - statistics.list - Rooms: @@ -361,6 +360,7 @@ Here you can also find what articles are incomplete and missing. - Settings: - get - update + - oauth - Spotlight - Subscriptions: - get diff --git a/developer-guides/rest-api/README.md b/developer-guides/rest-api/README.md index 616301d3d1..9f6213042e 100644 --- a/developer-guides/rest-api/README.md +++ b/developer-guides/rest-api/README.md @@ -21,7 +21,6 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and | Url | Short Description | Details Page | | :------------------------ | :-------------------------------------------------- | :------------------------------------- | | `/api/v1/info` | Information about the Rocket.Chat server. | [Link](miscellaneous/info/) | -| `/api/v1/settings.oauth` | Return list of all available oauth services. | [Link](miscellaneous/settings-oauth/) | | `/api/v1/statistics` | Statistics about the Rocket.Chat server. | [Link](miscellaneous/statistics/) | | `/api/v1/statistics.list` | Selectable statistics about the Rocket.Chat server. | [Link](miscellaneous/statistics-list/) | @@ -167,13 +166,14 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and ### Settings -| Url | Method | Short Description | Details Page | -| :-------------------------------- | :----- | :--------------------------------- | :---------------------------------------------- | -| `/api/v1/settings` | `GET` | Lists all private settings. | [Link](settings/get/) | -| `/api/v1/settings.public` | `GET` | Lists all public settings. | [Link](settings/public/) | -| `/api/v1/service.configurations` | `GET` | Lists all service configurations. | [Link](settings/service-configuration/) | -| `/api/v1/settings/:_id` | `GET` | Gets a setting. | [Link](settings/get-by-id/) | -| `/api/v1/settings/:_id` | `POST` | Updates a setting. | [Link](settings/update/) | +| Url | Method | Short Description | Details Page | +| :-------------------------------- | :----- | :-------------------------------------------------- | :---------------------------------------------- | +| `/api/v1/settings` | `GET` | Lists all private settings. | [Link](settings/get/) | +| `/api/v1/settings.public` | `GET` | Lists all public settings. | [Link](settings/public/) | +| `/api/v1/settings.oauth` | `GET` | Return list of all available oauth services. | [Link](settings/oauth/) | +| `/api/v1/service.configurations` | `GET` | Lists all service configurations. | [Link](settings/service-configuration/) | +| `/api/v1/settings/:_id` | `GET` | Gets a setting. | [Link](settings/get-by-id/) | +| `/api/v1/settings/:_id` | `POST` | Updates a setting. | [Link](settings/update/) | ### Subscriptions diff --git a/developer-guides/rest-api/miscellaneous/README.md b/developer-guides/rest-api/miscellaneous/README.md index e388aaa74e..3206137301 100644 --- a/developer-guides/rest-api/miscellaneous/README.md +++ b/developer-guides/rest-api/miscellaneous/README.md @@ -5,6 +5,5 @@ Just some generic information, such as information about the server and authenti | Url | Short Description | Details Page | | :--- | :--- | :--- | | `/api/v1/info` | Information about the Rocket.Chat server. | [info](info/) | -| `/api/v1/settings.oauth` | Return list of all available oauth services. | [Link](settings-oauth/) | | `/api/v1/statistics` | Statistics about the Rocket.Chat server. | [Link](statistics/) | | `/api/v1/statistics.list` | Selectable statistics about the Rocket.Chat server. | [Link](statistics-list/) | diff --git a/developer-guides/rest-api/miscellaneous/settings-oauth/README.md b/developer-guides/rest-api/miscellaneous/settings-oauth/README.md deleted file mode 100644 index 8ccd69bfd8..0000000000 --- a/developer-guides/rest-api/miscellaneous/settings-oauth/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Settings oAuth - -A simple method, requires no authentication, that returns list of all available oauth services. - -| URL | Requires Auth | HTTP Method | -| :--- | :--- | :--- | :--- | -| `/api/v1/settings.oauth` | `no` | `GET` | - -## Example Call - -```bash -curl http://localhost:3000/api/v1/settings.oauth -``` - -## Example Result - -```json -{ - "services": [ - { - "id": "iJeY7x4wxnh2p3pLr", - "name": "facebook", - "appId": "test", - "buttonLabelText": "test", - "buttonColor": "#13679A", - "buttonLabelColor": "#FFFFFF" - }, - { - "id": "iJeY7x4wxnh2p3pLr", - "name": "twitter", - "appId": "test", - "buttonLabelText": "", - "buttonColor": "", - "buttonLabelColor": "" - } - ], - "success": true -} -``` - -## Change Log - -| Version | Description | -| :--- | :--- | -| 0.63.0 | Added | diff --git a/developer-guides/rest-api/settings/README.md b/developer-guides/rest-api/settings/README.md index 8b7fdf1c2a..63e76ed4d6 100644 --- a/developer-guides/rest-api/settings/README.md +++ b/developer-guides/rest-api/settings/README.md @@ -4,8 +4,9 @@ You can get and update the settings via the REST API, only if you have permissio | Url | Method | Short Description | Details Page | | :--- | :--- | :--- | :--- | -| `/api/v1/settings` | `GET` | Lists all private settings. | [Link](get/) | -| `/api/v1/settings.public` | `GET` | Lists all public settings. | [Link](public/) | -| `/api/v1/service.configurations` | `GET` | Lists all service configurations. | [Link](service-configuration/) | -| `/api/v1/settings/:_id` | `GET` | Gets a setting. | [Link](get-by-id/) | -| `/api/v1/settings/:_id` | `POST` | Updates a setting. | [Link](update/) | +| `/api/v1/settings` | `GET` | Lists all private settings. | [Link](get/) | +| `/api/v1/settings.public` | `GET` | Lists all public settings. | [Link](public/) | +| `/api/v1/settings.oauth` | `GET` | Return list of all available oauth services. | [Link](oauth/) | +| `/api/v1/service.configurations` | `GET` | Lists all service configurations. | [Link](service-configuration/) | +| `/api/v1/settings/:_id` | `GET` | Gets a setting. | [Link](get-by-id/) | +| `/api/v1/settings/:_id` | `POST` | Updates a setting. | [Link](update/) | diff --git a/developer-guides/rest-api/settings/oauth/README.md b/developer-guides/rest-api/settings/oauth/README.md new file mode 100644 index 0000000000..99a217d794 --- /dev/null +++ b/developer-guides/rest-api/settings/oauth/README.md @@ -0,0 +1,67 @@ +# Settings oAuth + +A simple method, requires no authentication, that returns list of all available oauth services. + +| URL | Requires Auth | HTTP Method | +| :--- | :--- | :--- | :--- | +| `/api/v1/settings.oauth` | `no` | `GET` | + +## Example Call + +```bash +curl http://localhost:3000/api/v1/settings.oauth +``` + +## Example Result + +```json +{ + "services": [ + { + "id": "iJeY7x4wxnh2p3pLr", + "name": "facebook", + "clientId": "test", + "buttonLabelText": "test", + "buttonColor": "#13679A", + "buttonLabelColor": "#FFFFFF", + "custom": false + }, + { + "id": "iJeY7x4wxnh2p3pLr", + "name": "twitter", + "clientId": "test", + "buttonLabelText": "", + "buttonColor": "", + "buttonLabelColor": "", + "custom": false + }, + { + "_id": "5RQ4SBL3NuZKsqxaF", + "service": "test", + "clientId": "test", + "custom": true, + "serverURL": "/test/test", + "tokenPath": "/oauth/token", + "identityPath": "/me", + "authorizePath": "/oauth/authorize", + "scope": "openid", + "buttonLabelText": "test", + "buttonLabelColor": "#FFFFFF", + "loginStyle": "popup", + "buttonColor": "#13679A", + "tokenSentVia": "payload", + "identityTokenSentVia": "default", + "usernameField": "dfsgdfgdfgdfgsd", + "mergeUsers": true + } + ], + "success": true +} +``` + +## Change Log + +| Version | Description | +| :--- | :--- | +| 0.64.0 | Renamed field `appId` to `clientId` and added flag `custom` to indicate whether the oauth service is customized | +| 0.63.0 | Added |