diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-02-12 18:33:41 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-02-14 10:37:19 +0100 |
commit | ba2412769e2eee3e706b55422ec503b738f05da9 (patch) | |
tree | e2ca9928a780e60de7b07851386f2c0149d53a54 /recording | |
parent | 61de2c32c362f8904e80a2f3720919dd1245332b (diff) |
Add documentation for the recording server API
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'recording')
-rw-r--r-- | recording/docs/index.md | 5 | ||||
-rw-r--r-- | recording/docs/recording-api.md | 52 |
2 files changed, 57 insertions, 0 deletions
diff --git a/recording/docs/index.md b/recording/docs/index.md new file mode 100644 index 000000000..7665be6ee --- /dev/null +++ b/recording/docs/index.md @@ -0,0 +1,5 @@ +# Nextcloud Talk Recording Server Documentation + +## API + +* [Recording API](recording-api.md) diff --git a/recording/docs/recording-api.md b/recording/docs/recording-api.md new file mode 100644 index 000000000..25d4dc07e --- /dev/null +++ b/recording/docs/recording-api.md @@ -0,0 +1,52 @@ +# Nextcloud Talk Recording Server API + +* API v1: Base endpoint `/api/v1` + +## Get welcome message + +* Method: `GET` +* Endpoint: `/welcome` + +* Response: + - Status code: + + `200 OK` + +## Requests from the Nextcloud server + +* Method: `POST` +* Endpoint: `/room/{token}` + +* Header: + +| field | type | Description | +| ------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------- | +| `TALK_RECORDING_BACKEND` | string | The base URL of the Nextcloud server sending the request. | +| `TALK_RECORDING_RANDOM` | string | Random string that needs to be concatenated with request body to generate the checksum using the secret configured for the backend. | +| `TALK_RECORDING_CHECKSUM` | string | The checksum generated with `TALK_RECORDING_RANDOM`. | + +* Response: + - Status code: + + `200 OK` + + `400 Bad Request`: When the body size exceeds the maximum allowed message size. + + `400 Bad Request`: When the body data does not match the expected format. + + `403 Forbidden`: When the request validation failed. + +### Start call recording + +* Data format (JSON): + + { + "type": "start", + "start": { + "status": "the-type-of-recording (1 for audio and video, 2 for audio only)", + "owner": "the-user-to-upload-the-resulting-file-as", + } + } + +### Stop call recording + +* Data format: + + { + "type": "stop", + } |