Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Document new Sharee API #1626

Closed
rullzer opened this issue Sep 1, 2015 · 12 comments
Closed

Document new Sharee API #1626

rullzer opened this issue Sep 1, 2015 · 12 comments

Comments

@rullzer
Copy link
Contributor

rullzer commented Sep 1, 2015

owncloud/core#18234

@nickvergessen

@SergioBertolinSG
Copy link
Contributor

Mobile apps are going to start to develop using this today. Would be nice to have docs ready. At least a first draft.
cc @ggdiez @davivel

@nickvergessen
Copy link
Contributor

This is the URL to be used:
http://localhost/owncloud/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json

Allowed method: GET

Query strings:

Key type description default
search string the search string
itemType string the type which is shared (e.g. file or folder)
shareType[] integer any of the shareTypes (0,1, 4, 6)
page integer the page number to be returned 1
perPage integer the number of items per page 200

Result:
For each sharee there will be on entry in this form:

{
  "label": "admin",
  "value": {
    "shareType": 1,
    "shareWith": "admin"
  }
}

or

   <element>
    <label>admin</label>
    <value>
     <shareType>0</shareType>
     <shareWith>admin</shareWith>
    </value>
   </element>

Depending on the request.

The complete response looks like this:

{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": null
    },
    "data": {
      "exact": {
        "users": [

        ],
        "groups": [

        ],
        "remotes": [

        ]
      },
      "users": [
        {
          "label": "admin",
          "value": {
            "shareType": 0,
            "shareWith": "admin"
          }
        },
        {
          "label": "test1",
          "value": {
            "shareType": 0,
            "shareWith": "test1"
          }
        }
      ],
      "groups": [
        {
          "label": "admin",
          "value": {
            "shareType": 1,
            "shareWith": "admin"
          }
        },
        {
          "label": "tester",
          "value": {
            "shareType": 1,
            "shareWith": "tester"
          }
        }
      ],
      "remotes": [

      ]
    }
  }
}

The exact list holds an array of exact matches. those should be presented first.

Sharees that have the item already shared need to be filtered out.

@SergioBertolinSG
Copy link
Contributor

@nickvergessen thanks!

@ggdiez
Copy link

ggdiez commented Sep 24, 2015

@SergioBertolinSG @nickvergessen
I go to start with the Sharees in the iOS app

Thanks!!!

@davivel
Copy link
Contributor

davivel commented Sep 24, 2015

cc @masensio @rperezb

@PVince81
Copy link
Contributor

PVince81 commented Nov 7, 2016

I don't see this in any dev doc, @carlaschroder did you close this by mistake ?

@carlaschroder
Copy link
Contributor

I don't see this in any dev doc, @carlaschroder did you close this by mistake ?

No idea. That was a year ago.

@carlaschroder
Copy link
Contributor

Ah, closed in April. Still no idea.

@settermjd settermjd added this to the Documentation Backlog milestone Dec 20, 2016
@settermjd settermjd changed the title Document new Sharee API (#18234) Document new Sharee API Dec 20, 2016
@settermjd settermjd modified the milestones: Documentation Backlog, 10.0 Dec 21, 2016
@hodyroff
Copy link

Share API is currently here: https://doc.owncloud.org/server/9.1/developer_manual/core/ocs-share-api.html
Whats wrong with it?

@PVince81
Copy link
Contributor

Sharee, extra "e" 😉

I prefer to call it "recipients" instead of "sharee".
There's a new OCS endpoint that is used by the share dialog autocomplete when you pick a user/group to share to. That's the one.

@pmaier1
Copy link
Contributor

pmaier1 commented Dec 22, 2016

Well, 'sharee' is a common term in the 'internet/cloud dictionary'. Since 'recipient' is way more clear and easier to understand I vote for it.

@davivel
Copy link
Contributor

davivel commented Jan 10, 2017

There's a new OCS endpoint

Ayayayay, endpoint update incoming?

settermjd added a commit that referenced this issue May 8, 2017
This commit fixes #1626 and provides initial documentation for the
recipient API. I don't expect that this will be the final commit for
this endpoint, but the first working draft.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants