edemaine / comingle

Multiroom meeting app integrating web tools
MIT License
44 stars 8 forks source link

REST API #125

Closed mehtank closed 3 years ago

mehtank commented 3 years ago

(or maybe this exists and I can't find it)

Is there a way to create / modify rooms by scripted GET calls? I'm thinking of a use case where a set of rooms are created offline e.g. as a text / md / json / yaml file, then a script loops through and modifies a comingle instance, perhaps archiving old rooms, creating new rooms with specified tabs (maybe even populating new coauthor threads accordingly), etc.

edemaine commented 3 years ago

It doesn't exist, but it would be easy to make one; see cocreate's server/api.coffee. Would you be willing to take a first crack at it as a PR? If not, I can probably do it...

First priority is probably creating rooms, probably by calling lib/rooms.coffee's roomWithTemplate (see Config.coffee's newMeetingRooms for an example input) — though roomWithTemplate could probably use some checking on the template argument to make sure that each tabTypes[type] is actually defined.

mehtank commented 3 years ago

I do intend to give it a try, but I haven't actually gotten the system installed and running on my own server yet, so that'll have to come first...

edemaine commented 3 years ago

FWIW, it's a lot easier to get it running locally on your development machine. Let me know if you need help with either.

mehtank commented 3 years ago

The code in https://github.com/mehtank/comingle/tree/rest has been working well for me so far; it's open to the world without any access control so it's not pull ready though. There's no notion of users in comingle, so how would you suggest securing it?

edemaine commented 3 years ago

Cool! The natural starting point would be to just add /addRoom, which requires a correct meeting ID to work, and is something any user can do with a web browser anyway. Would merging just this (and other operations that can be done on the web so are safe) be useful to you?

Certainly /list and /delete need authentication (related to #89), so are blocking on #53 (and we'll need a way to authenticate the REST API...).

mehtank commented 3 years ago

It would definitely be useful; see #131 for (some) safe things that can be done. One thing to note is that there's no error checking on the args to addRoom / roomWithTabs -- I don't know if there are any Bad Things that can be sent in that way? Also it fails lint, but, uh, I have no idea what lint is.