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

OCS Sharing API v2 #21798

Closed
rullzer opened this issue Jan 20, 2016 · 16 comments
Closed

OCS Sharing API v2 #21798

rullzer opened this issue Jan 20, 2016 · 16 comments

Comments

@rullzer
Copy link
Contributor

rullzer commented Jan 20, 2016

The current OCS Sharing API v1 is in need of successor.

We should design an API that fits the new needs of all the clients (web, desktop and mobile).

@PVince81
Copy link
Contributor

Do I understand it well that most important part of this is making the reshare permissions properly available to the clients ?

Are there other requirements from the clients ?

@davivel @SergioBertolinSG @jvillafanez

@rullzer
Copy link
Contributor Author

rullzer commented Jan 20, 2016

For the clients yes. But the id=>string is important to properly allow 3rdparty share providers

@PVince81
Copy link
Contributor

@davivel
Copy link

davivel commented Jan 22, 2016

@PVince81 , another information that I find useful from a received share is the identification of the sharer. The web UI shows it clearly when the "share" icon is pressed, no matter if the user then reshares or not.

Anyway, this is maybe more specific of #21179...

@PVince81
Copy link
Contributor

@rullzer didn't you add these lately ?

@davivel
Copy link

davivel commented Jan 22, 2016

@rullzer , @PVince81 , I closed #21779 in favor of #21855. I think it's clearer.

@PVince81
Copy link
Contributor

  • make it possible to get shares by file id instead of path: new attribute ? This could improve performance as the backend won't need to resolve the path, but then it also needs to check whether the user is allowed to access that file...

@PVince81
Copy link
Contributor

  • update share must accept setting multiple values at once, not a single one (like a real REST API)

@PVince81
Copy link
Contributor

  • be more REST-compliant
    • have consistent parameter names for both request and response: "expireDate" vs "expiration" ...
    • when doing a PUT/POST, return the whole list of attributes like with GET
    • a PUT is supposed to resend to full entity, all attributes (luckily the current API doesn't complain if we do so)
    • optional: implement PATCH method to only send a few of the attributes (like setting password, etc)

@PVince81
Copy link
Contributor

Currently, this call

% curl -X GET 'http://root:admin@localhost/owncloud/ocs/v2.php/apps/files_sharing/api/v1/shares?path=abc&subfiles=true&format=json'

is the only way to quickly get the share status for files within a folder.
This is already used by the mobile client and possibly desktop client to be able to display status icons.

However it can be wasteful when a single file/folder is shared with 100 users, in which case it returns 100 entries all pointing at this file/folder.

Ideal would be to have a summary mode, either as extra attribute "groupresults=true" or "summary=true" or a separate endpoint to query such status.

  • summary mode / grouping of results by path to save response size

@rullzer
Copy link
Contributor Author

rullzer commented Feb 18, 2016

Before any sharing we want to know the max permissions:

  • If a file is read-only for us we can't share it read-write.
  • If resharing is now allowed
  • ....

We should have an endpoint that returns the proper permissions for a path. Combined with a specific share type.

  • Add endpoint to request the max share permissions of a path for a specific type.

@rullzer
Copy link
Contributor Author

rullzer commented Feb 26, 2016

Currently when we disable the Sharing API we just don't return anything.
We should return a 403 or something.

  • Proper status code when OCS Share API is disabled.

@rullzer
Copy link
Contributor Author

rullzer commented Mar 7, 2016

  • Allow 'notify by e-mail' stuff.

@rullzer
Copy link
Contributor Author

rullzer commented Mar 7, 2016

Before any sharing we want to know the max permissions:

  • If a file is read-only for us we can't share it read-write.
  • If resharing is now allowed
  • ....

We should have an endpoint that returns the proper permissions for a path. Combined with a specific > share type.

  • Add endpoint to request the max share permissions of a path for a specific type.

Possible solution in #22834
It uses webdav but that is cleaner anyway IMO

@rullzer
Copy link
Contributor Author

rullzer commented Apr 1, 2016

#22834 is in

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

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

5 participants