Hubs-Foundation / hubs-cloud

Resources for self hosted Hubs Cloud instances
Mozilla Public License 2.0
155 stars 99 forks source link

Checklist for releasing the backend API on Hubs Cloud #154

Open johnshaughnessy opened 3 years ago

johnshaughnessy commented 3 years ago

┆Issue is synchronized with this Jira Task

blairmacintyre commented 3 years ago

Hi @johnshaughnessy is there an overview of the backend API somewhere? We're actually just doing some planning and I'd really love to know what's coming.

johnshaughnessy commented 3 years ago

Hi @blairmacintyre Yes -- there is some preliminary documentation at https://github.com/mozilla/reticulum/blob/master/guides/api.md . We will add more as we get closer to opening it up for people to use.

blairmacintyre commented 3 years ago

Here's the use case I have, and I think we need at least one more entry point: duplicateRoom We are creating a digital version of our Reality Media book (coming out in the fall via MIT Press!). The digital version will be based on Hubs cloud.

We want this flow

The bits I think are needed are

johnshaughnessy commented 3 years ago

generate a copy of a room (duplicate the room, with all the same scene and content elements) (seems like a "duplicateRoom" might do this)

Creating a new room with the same scene is definitely possible with the API, but we don't yet have a way to export the content of a particular room. (Some relevant issues on this topic from last year: https://github.com/mozilla/hubs/issues/2303 https://github.com/mozilla/hubs/issues/2331 )

find and update room links in the rooms to the other rooms in the new set (essentially, this is a general version of "find pieces of content and replace them", since we might also want to do other things like replace an image or similar). It might be possible to do these things on the fly with a modified client

Yes, this would have to be done by a modified client or a bot that keeps a persistent connection to each of the rooms and interacts with it thru client APIs. It sounds great (and I can imagine a lot of uses API's that grant programmatic access to room content), but we haven't built anything like that (yet).

Thank you for giving more detail about what you're trying to do -- this helps inform decision-making about what to work on next.

blairmacintyre commented 3 years ago

Those issues are different than this, I think.

What we need is MUCH more focused: instead of creating a room from a scene, or deleting a room, we want to duplicate it. It would require duplicating the content elements (unclear to me, since I haven't looked at this part of the system, if you can simply create pointers in the new room to the content elements or if you need to create new content elements that point at the same things).

Exporting, etc., has a whole bunch of implications, that I agree are complex.

Being able to edit rooms is, as we both know, and even higher level of complexity, and could reasonably be done in a bot or similar.

blairmacintyre commented 3 years ago

Dumb question : where would I be able to call this from?

dumip commented 2 years ago

Hi, I have found it really tedious to create a new room from an external client and I see that the GraphQL client is not available to developers yet. Any chance to understand when the GraphQL API will be available to users?