Skip to content

Share API 2.0 #13014

Closed
Closed

Description

@schiessle

I think it become more and more clear that we need to improve the share API in a way that makes it no longer possible to keep the API stable. There is just to many old, broken and confusing stuff. Just one extremely confusing example: the "shareWith" parameter in shareItem() is used for the password for public link shares. Also other stuff we want to change anyway will result in large changes, e.g. reorganizing the re-share behaviour (#9058). So we should take the chance and do it right.

Possible target release: 8.2

Suggested way forward:

We implement a share API 2.0 and make sure to migrate all apps in time (files, calendar and contacts). Depending on the changes to the database structure we can deprecate the old API and keep it around for 1-2 releases. But I think if we manage to upgrade all the apps in parallel this wouldn't be necessarily needed and would make changes to the DB probably a lot easier.

What should change:

  • move away from the static classes
  • share API should not care about share type (at the moment there are a lot of "if shareType ==foo then ... else ..." this shouldn't be there)
  • share table shouldn't distinguish between "item_source" and "file_source" and stuff like that, for the share api/table exerything should be a item, period.
  • the API should become a lot easier, the API should mainly read/write the shares to the table everything else should be handled by the back-ends because only the back-ends know the best way to handle their share types.
  • ideally the API will come with a OCS/REST/WebDAV API, needs to be decided and can also be added later
  • ...

I think this way we will reduce a lot of complexity, improve performance and make the code maintainable again. Also the new API should be more fun to use than the current one.

Activity

  1. self-assigned this
    on Dec 23, 2014
  2. schiessle commented on Dec 23, 2014

    @schiessle
    ContributorAuthor
  3. karlitschek commented on Dec 24, 2014

    @karlitschek
    Contributor

    sounds reasonable

  4. added this to the milestone on Jan 17, 2015
  5. PVince81 commented on Feb 4, 2015

    @PVince81
    Contributor

    A suggestion has been made here to use entity mappers to make it easier to use the share API on PHP level: #13424

  6. modified the milestones: , on Mar 2, 2015
  7. MorrisJobke commented on Aug 31, 2015

    @MorrisJobke
    Contributor
  8. modified the milestones: , on Sep 19, 2015
  9. MorrisJobke commented on Feb 8, 2016

    @MorrisJobke
    Contributor

    Closing inf favor of #19331

  10. lock commented on Aug 6, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  11. locked as resolved and limited conversation to collaborators on Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions