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

API is inconsistent in itself and compared to other apps and core #678

Open
donquixote opened this issue Jan 25, 2023 · 1 comment
Open
Assignees
Labels
api Modification linked to internal or external call to the application backend Modification related to backend proposition Suggested improvement to be discussed

Comments

@donquixote
Copy link

donquixote commented Jan 25, 2023

Hello,
I notice some inconsistencies in the API of the workspace app.
https://github.com/arawa/workspace/blob/main/appinfo/routes.php
(I don't know where else to look for documentation)

  • Some urls are like /spaces, others like /workspaces, and sometimes /api/workspace/*. In some cases these do the same, in others not. In other apps or core, there is usually one main path (e.g. apps/groupfolders/folders), and the main difference is just method POST vs GET vs PUT vs DELETE etc, and a minimal suffix to target a specific id.
  • Responses from workspace have all the info at the top level. In other apps or core, there is ocs: {meta: {..}, data: {..}}.
  • Seems like page#index is a leftover?
  • Property names are inconsistent. E.g. sometimes we have 'folderId', other times 'folder_id' or 'groupfolder_id'
  • 'groups' sometimes is an array of group ids, another time it is an array of arrays each with id and display name.

Do you have any plans to change this?

@zak39
Copy link
Collaborator

zak39 commented Aug 4, 2023

Hello,

Yes, I created an issue on this subject : #647.
I would like the route POST workspace/spaces with spacename as a variable to be able to do these steps backend side :

  • Create a groupfolder
  • Enable ACL
  • Add groups in the groupfolder
  • Add one group in the Advanced Permissions

We are studying how to implement it while respecting the Nextcloud's guidelines.

@zak39 zak39 self-assigned this Aug 4, 2023
@zak39 zak39 added backend Modification related to backend api Modification linked to internal or external call to the application proposition Suggested improvement to be discussed labels Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Modification linked to internal or external call to the application backend Modification related to backend proposition Suggested improvement to be discussed
Projects
None yet
Development

No branches or pull requests

2 participants