Merge pull request #3662 from nextcloud/techdebt/3292/docs-for-clustering

Add docs for the HPB conversation clustering
This commit is contained in:
Joas Schilling 2020-05-26 11:32:26 +02:00 коммит произвёл GitHub
Родитель 8efc0a24e8 30bc12bf32
Коммит eaac931fc0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 71 добавлений и 40 удалений

Просмотреть файл

@ -8,7 +8,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/call/{token}`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the conversation is read-only
+ `404 Not Found` When the conversation could not be found for the participant
@ -34,7 +34,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`flags` | int | Flags what streams are provided by the participant (see [Constants - Participant in-call flag](constants.md#participant-in-call-flag))
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the conversation is read-only
+ `404 Not Found` When the conversation could not be found for the participant
@ -47,7 +47,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/call/{token}`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the conversation is read-only
+ `404 Not Found` When the conversation could not be found for the participant

Просмотреть файл

@ -77,7 +77,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`referenceId` | string | A reference string to be able to identify the message again in a "get messages" request, should be a random sha256 (only available with `chat-reference-id` capability)
* Response:
- Header:
- Status code:
+ `201 Created`
+ `400 Bad Request` In case of any other error
+ `403 Forbidden` When the conversation is read-only
@ -99,7 +99,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`lastReadMessage` | int | The last read message ID
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the room could not be found for the participant,
or the participant is a guest.

Просмотреть файл

@ -40,3 +40,9 @@ title: Constants
## Webinary lobby states
* `0` no lobby
* `1` lobby for non moderators
## Signaling modes
* `internal` No external signaling server is used
* `external` A single external signaling server is used
* `conversation_cluster` An external signaling server is assigned per conversation

Просмотреть файл

@ -9,10 +9,16 @@
* Endpoint: `/room`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `401 Unauthorized` when the user is not logged in
- Header:
field | type | Description
------|------|------------
`X-Nextcloud-Talk-Hash` | string | Sha1 value over some config. When you receive a different value on subsequent requests, the capabilities and the signaling settings should be refreshed.
- Data:
Array of conversations, each conversation has at least:
@ -61,7 +67,7 @@
`roomName` | string | conversation name (Not available for `roomType = 1`)
* Response:
- Header:
- Status code:
+ `200 OK` When the "one to one" conversation already exists
+ `201 Created` When the conversation was created
+ `400 Bad Request` When an invalid conversation type was given
@ -77,10 +83,16 @@
* Endpoint: `/room/{token}`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the conversation could not be found for the participant
- Header:
field | type | Description
------|------|------------
`X-Nextcloud-Talk-Hash` | string | Sha1 value over some config. When you receive a different value on subsequent requests, the capabilities and the signaling settings should be refreshed.
- Data: See array definition in `Get user´s conversations`
## Rename a conversation
@ -94,7 +106,7 @@
`roomName` | string | New name for the conversation (1-200 characters)
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the name is too long or empty
+ `400 Bad Request` When the conversation is a one to one conversation
@ -107,7 +119,7 @@
* Endpoint: `/room/{token}`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation is a one-to-one conversation (Use [Remove yourself from a conversation](participant.md#Remove-yourself-from-a-conversation) instead)
+ `403 Forbidden` When the current user is not a moderator/owner
@ -119,7 +131,7 @@
* Endpoint: `/room/{token}/public`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation is not a group conversation
+ `403 Forbidden` When the current user is not a moderator/owner
@ -131,7 +143,7 @@
* Endpoint: `/room/{token}/public`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation is not a public conversation
+ `403 Forbidden` When the current user is not a moderator/owner
@ -148,7 +160,7 @@
`state` | int | New state for the conversation
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation type does not support read-only (only group and public conversation)
+ `403 Forbidden` When the current user is not a moderator/owner or the conversation is not a public conversation
@ -165,7 +177,7 @@
`password` | string | New password for the conversation
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the current user is not a moderator or owner
+ `403 Forbidden` When the conversation is not a public conversation
@ -182,7 +194,7 @@
`password` | string | Set a new password for the conversation
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the current user is not a moderator/owner
+ `403 Forbidden` When the conversation is not a public conversation
@ -194,7 +206,7 @@
* Endpoint: `/room/{token}/favorite`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `401 Unauthorized` When the participant is a guest
+ `404 Not Found` When the conversation could not be found for the participant
@ -205,7 +217,7 @@
* Endpoint: `/room/{token}/favorite`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `401 Unauthorized` When the participant is a guest
+ `404 Not Found` When the conversation could not be found for the participant
@ -221,7 +233,7 @@
`level` | int | The notification level (See [Participant notification levels](constants.md#Participant-notification-levels))
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the the given level is invalid
+ `401 Unauthorized` When the participant is a guest

Просмотреть файл

@ -13,7 +13,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`fileId` | int | File id for which the conversation should be given
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the item was not found
+ `404 Not Found` When the found item is not a file
@ -37,7 +37,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`shareToken` | string | Share token for which the conversation should be given
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the share was not found
+ `404 Not Found` When the user can not access the share
@ -60,7 +60,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`shareToken` | string | Share token for which the conversation should be given
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the share was not found
+ `404 Not Found` When "Request password via Talk" is not active for the share

Просмотреть файл

@ -1,6 +1,4 @@
# Internal signaling API
See [External Signaling API](standalone-signaling-api-v1.md) for the Signaling of the High-Performance Backend.
# Signaling API
Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
@ -12,10 +10,19 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
field | type | Description
------|------|------------
`stunservers` | array | STUN servers
`turnservers` | array | TURN servers
`token` | string | The conversation to get the signaling settings for
* Response:
field | type | Description
------|------|------------
`signalingMode` | string | See [Signaling modes](constants.md#Signaling_modes)
`userId` | string | Current user id
`hideWarning` | string | Don't show a performance warning although internal signaling is used
`server` | string | URL of the external signaling server
`ticket` | string | Ticket for the external signaling server
`stunservers` | array | STUN servers
`turnservers` | array | TURN servers
- STUN server
@ -33,8 +40,14 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`credential` | string | User password for the TURN server
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found`
### Internal signaling API
Todo
### External signaling API
See [External signaling API](standalone-signaling-api-v1.md) for the Signaling of the High-Performance Backend.

Просмотреть файл

@ -8,7 +8,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/room/{token}/participants`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the participant is a guest
+ `404 Not Found` When the conversation could not be found for the participant
@ -37,7 +37,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`source` | string | Source of the participant(s) as returned by the autocomplete suggestion endpoint (default is `users`)
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the source type is unknown, currently `users`, `groups`, `emails` are supported. `circles` are supported with `circles-support` capability
+ `400 Bad Request` When the conversation is a one-to-one conversation
@ -62,7 +62,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`participant` | string | User to remove
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant is a moderator or owner
+ `400 Bad Request` When there are no other moderators or owners left
@ -77,7 +77,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/room/{token}/participants/self`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant is a moderator or owner and there are no other moderators or owners left.
+ `404 Not Found` When the conversation could not be found for the participant
@ -93,7 +93,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`participant` | string | Session ID of the guest to remove
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the target participant is not a guest
+ `403 Forbidden` When the current user is not a moderator or owner
@ -111,7 +111,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`password` | string | Optional: Password is only required for users which are of type `4` or `5` and only when the conversation has `hasPassword` set to true.
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the password is required and didn't match
+ `404 Not Found` When the conversation could not be found for the participant
@ -128,7 +128,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/room/{token}/participants/active`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the conversation could not be found for the participant
@ -144,7 +144,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`sessionId` | string or null | Guest session to promote
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant to promote is not a normal user (type `3`) or normal guest (type `4`)
+ `403 Forbidden` When the current user is not a moderator or owner
@ -164,7 +164,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`sessionId` | string or null | Guest session to demote
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant to demote is not a moderator (type `2`) or guest moderator (type `6`)
+ `403 Forbidden` When the current participant is not a moderator or owner
@ -183,7 +183,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`displayName` | string | The new display name
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the current user is not a guest
+ `404 Not Found` When the conversation could not be found for the participant

Просмотреть файл

@ -14,7 +14,7 @@
`value` | string | The value to set
* Response:
- Header:
- Status code:
+ `200 OK` When the value was updated
+ `400 Bad Request` When the key or value was invalid
+ `401 Unauthorized` When the user is not logged in

Просмотреть файл

@ -22,7 +22,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`timer` | int/null | Timestamp when the lobby state is reset to no lobby
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation type does not support lobby (only group and public conversation atm)
+ `400 Bad Request` When the given timestamp is invalid

Просмотреть файл

@ -27,7 +27,7 @@ nav:
- 'Webinar management': 'webinar.md'
- 'Settings': 'settings.md'
- 'Integration by other apps': 'integration.md'
- 'Internal signaling API': 'internal-signaling.md'
- 'Signaling API': 'internal-signaling.md'
- 'External signaling API': 'standalone-signaling-api-v1.md'
- Commands: 'commands.md'
- 'PHP events': 'events.md'