You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.9 KiB

  1. # Call API
  2. Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
  3. ## Get list of connected participants
  4. * Method: `GET`
  5. * Endpoint: `/call/{token}`
  6. * Response:
  7. - Header:
  8. + `200 OK`
  9. + `403 Forbidden` When the conversation is read-only
  10. + `404 Not Found` When the conversation could not be found for the participant
  11. + `412 Precondition Failed` When the lobby is active and the user is not a moderator
  12. - Data:
  13. Array of participants, each participant has at least:
  14. field | type | Description
  15. ------|------|------------
  16. `userId` | string | Is empty for guests
  17. `lastPing` | int | Timestamp of the last ping of the user (should be used for sorting)
  18. `sessionId` | string | 512 character long string
  19. ## Join a call
  20. * Method: `POST`
  21. * Endpoint: `/call/{token}`
  22. * Data:
  23. field | type | Description
  24. ------|------|------------
  25. `flags` | int | Flags what streams are provided by the participant (see [Constants - Participant in-call flag](constants.md#participant-in-call-flag))
  26. * Response:
  27. - Header:
  28. + `200 OK`
  29. + `403 Forbidden` When the conversation is read-only
  30. + `404 Not Found` When the conversation could not be found for the participant
  31. + `404 Not Found` When the user did not join the conversation before
  32. + `412 Precondition Failed` When the lobby is active and the user is not a moderator
  33. ## Leave a call (but staying in the conversation for future calls and chat)
  34. * Method: `DELETE`
  35. * Endpoint: `/call/{token}`
  36. * Response:
  37. - Header:
  38. + `200 OK`
  39. + `403 Forbidden` When the conversation is read-only
  40. + `404 Not Found` When the conversation could not be found for the participant
  41. + `404 Not Found` When the user did not join the conversation before
  42. + `412 Precondition Failed` When the lobby is active and the user is not a moderator