owncloud / product

ownCloud Product Backlog
GNU Lesser General Public License v3.0
0 stars 1 forks source link

[ocis] sharees endpoint give invalid response for xml format #292

Open dpakach opened 4 years ago

dpakach commented 4 years ago

description

getting the list of sharees from the sharees endpoint gives invalid format of data when requesting XML format.

curl https://localhost:9200/ocs/v2.php/apps/files_sharing/api/v1/sharees\?search\=ShareeGroupNonMember\&itemType\=file\?format\=json -k -u moss:vista | xmllint --format -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   159  100   159    0     0   1892      0 --:--:-- --:--:-- --:--:--  1892
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>200</statuscode>
    <message>OK</message>
  </meta>
  <data>
    <exact/>
  </data>
</ocs>

for similar response in json format


curl https://localhost:9200/ocs/v2.php/apps/files_sharing/api/v1/sharees\?search\=ShareeGroupNonMember\&itemType\=file\&format\=json -k -u moss:vista | jq                
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   155  100   155    0     0   1504      0 --:--:-- --:--:-- --:--:--  1504
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": "OK"
    },
    "data": {
      "exact": {
        "users": [],
        "groups": [],
        "remotes": []
      },
      "users": [],
      "groups": [],
      "remotes": []
    }
  }
}