WebApi v2.1 Renaming a library

So I recently installed Seafile Pro Server 6.0.9 and it seems renaming a library won’t work.

I made the following post request:

{server_url}/api2/repos/{repo-id}/
with a body of:
op=rename
repo_name=new_name

The response I get is “success” but the library is not actually renamed.
What am I doing wrong?

Any help is greatly appreciated

I have just tested this api, and it works well:

curl -d "repo_name=123com" -H "Authorization: Token e44e3c81b70b07e3a5f580db8ffcbb886f8ee06d" -H 'Accept: application/json; indent=4' "http://192.168.1.227/api2/repos/ed00609f-e9e8-4fab-8bd3-e418ee280f90/?op=rename"

This should not be in the request body.

Weird enough that’s the only way to get it to work. I know the docs say otherwise…

It seems when my folders or library has special characters in it, it won’t work.
So from now on I only allow A-Z a-z 0-9 \ - _ and renaming works like a charm

Have you done url encoding for special chars?