Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checklist for releasing the backend API on Hubs Cloud #154

Open
1 of 8 tasks
johnshaughnessy opened this issue Jan 7, 2021 · 7 comments
Open
1 of 8 tasks

Checklist for releasing the backend API on Hubs Cloud #154

johnshaughnessy opened this issue Jan 7, 2021 · 7 comments

Comments

@johnshaughnessy
Copy link
Contributor

johnshaughnessy commented Jan 7, 2021

┆Issue is synchronized with this Jira Task

@blairmacintyre
Copy link

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
Copy link
Contributor Author

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
Copy link

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

  • someone comes to our site (could just be the hubs cloud site, or a separate node.js based site)
  • create an account
  • when they create an account, we generate a "copy of the book" (i.e., a copy of the rooms of the book)
  • this copy is complete and self contained
  • someone may ask to "reset" the whole copy, or just a room, which would be done with a "delete and copy again"

The bits I think are needed are

  • generate a copy of a room (duplicate the room, with all the same scene and content elements) (seems like a "duplicateRoom" might do this)
  • 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 (e.g., the first time they visit a copy of a room, we find and replace things)

@johnshaughnessy
Copy link
Contributor Author

johnshaughnessy commented Jan 25, 2021

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: mozilla/hubs#2303 mozilla/hubs#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
Copy link

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
Copy link

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

@dumip
Copy link

dumip commented Apr 19, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants