Skip to content

Sharee retrieves the information about a share -but gets response containing all the shares  #1257

Closed
cs3org/reva
#1302

Description

@jasson99
  1. Create users Alice and Brian
  2. User Alice creates files textfile0.txt and textfile1.txt
  3. User Alice shares file textfile0.txt with user brian
  4. User Alice shares file textfile1.txt with user brian
  5. User Brian gets all the shares shared with him that are received as file textfile0.txt as:
curl -u brian:12345 "http://localhost:9140/ocs/v2.php/apps/files_sharing/api/v1/shares?shared_with_me=true&path=textfile0.txt" -H "OCS-APIREQUEST" | xmllint --format -
  1. Then the reponse is as:
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>200</statuscode>
    <message>OK</message>
  </meta>
  <data>
    <element>
      <id>0fad98f3-31c9-4f37-b125-e4483f059c40</id>
      <share_type>0</share_type>
      <uid_owner>alice</uid_owner>
      <displayname_owner>User Alice</displayname_owner>
      <permissions>31</permissions>
      <stime>1591869854</stime>
      <parent/>
      <expiration/>
      <token/>
      <uid_file_owner>alice</uid_file_owner>
      <displayname_file_owner>User Alice</displayname_file_owner>
      <additional_info_owner/>
      <additional_info_file_owner/>
      <state>1</state>
      <path>/textfile0.txt</path>
      <item_type>folder</item_type>
      <mimetype>httpd/unix-directory</mimetype>
      <storage_id>1284d238-aa92-42ce-bdc4-0b0000009162</storage_id>
      <storage>0</storage>
      <item_source>c76885c7-5831-46b0-8971-7a1f65165be1</item_source>
      <file_source>c76885c7-5831-46b0-8971-7a1f65165be1</file_source>
      <file_parent/>
      <file_target>/textfile0.txt</file_target>
      <share_with>brian</share_with>
      <share_with_displayname>User Brian</share_with_displayname>
      <share_with_additional_info/>
      <mail_send/>
    </element>
    <element>
      <id>0db984fd-c3f9-421b-bdab-ab2abb2dc68a</id>
      <share_type>0</share_type>
      <uid_owner>alice</uid_owner>
      <displayname_owner>User Alice</displayname_owner>
      <permissions>31</permissions>
      <stime>1591869864</stime>
      <parent/>
      <expiration/>
      <token/>
      <uid_file_owner>alice</uid_file_owner>
      <displayname_file_owner>User Alice</displayname_file_owner>
      <additional_info_owner/>
      <additional_info_file_owner/>
      <state>1</state>
      <path>/textfile1.txt</path>
      <item_type>folder</item_type>
      <mimetype>httpd/unix-directory</mimetype>
      <storage_id>1284d238-aa92-42ce-bdc4-0b0000009162</storage_id>
      <storage>0</storage>
      <item_source>b0e9c656-21fb-46cd-b4e5-44278413d435</item_source>
      <file_source>b0e9c656-21fb-46cd-b4e5-44278413d435</file_source>
      <file_parent/>
      <file_target>/textfile1.txt</file_target>
      <share_with>brian</share_with>
      <share_with_displayname>User Brian</share_with_displayname>
      <share_with_additional_info/>
      <mail_send/>
    </element>
  </data>
</ocs>

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions