sharerenamer icon indicating copy to clipboard operation
sharerenamer copied to clipboard

Is it possible to use via CLI or API?

Open xeruf opened this issue 2 years ago • 1 comments

I use curl to batch create shares via the OCS Share API: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html#create-a-new-share

Is there anything similar possible when using this app to batch rename the shares?

xeruf avatar Mar 31 '23 16:03 xeruf

Currently not, as the rename api route performs a CSRF check (see https://github.com/JonathanTreffler/sharerenamer/pull/31#issuecomment-882139672), you can patch the sharerenamer app locally for yourself by adding the NoCSRFRequired annotation (see https://github.com/JonathanTreffler/sharerenamer/pull/31#issuecomment-881188860).

A solution would be to add a second api route, that does not perform the check, many other apps have this, I have just not come around to implementing it here, as only few people need it.

JonathanTreffler avatar Mar 31 '23 19:03 JonathanTreffler