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

Deprecate files API call to set favorites in favor of standard PROPPATCH #31438

Closed
SamuAlfageme opened this issue May 15, 2018 · 1 comment
Closed

Comments

@SamuAlfageme
Copy link

Setting test.txt as favorite:

Current WebUI's Implementation:

curl -u 'admin:admin' -X POST https://localhost/index.php/apps/files/api/v1/files/test.txt \
  -H 'Content-Type: application/json' \
  -d '{
	"tags": [
		"_$!<Favorite>!$_"
	]
}'

Proposal:

curl -u 'admin:admin' -X PROPPATCH https://localhost/remote.php/dav/files/admin/test.txt \
  -H 'Content-Type: application/xml' \
  -d '<?xml version="1.0" ?>
<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
    <d:set>
    <d:prop>
        <oc:favorite>1</oc:favorite>
    </d:prop>
  </d:set>
</d:propertyupdate>
'

To unset it; make it <oc:favorite>0</oc:favorite> /cc @PVince81 as PROPPATCH advocate

@PVince81
Copy link
Contributor

Oh... I didn't realize we still had the old thing :-/

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

4 participants