Server 8.0.5: Code 405 "Method POST not allowed" from Web API

I tried to create a new library via the web api as documented in the seafile documentation /web-api/v2.1/libraries.md#user-content-Create%20Library

But a result I got a HTTP code 405 and the reply is
{
“detail”: “Method “POST” not allowed.”
}

I copy-pasted the sample curl command from the above documentation, then replaced host name and auth token.
Other api calls like listing libraries, getting upload-link and uploading a file to an existing library work just fine.

I’m running the official docker image via the docker-compose.yml from the documentation.

How can I create a new library via the web api?

TIA,
Joe

Found a solution by human fuzzing: The web api documentation is not even close to reality. The url is

POST https://cloud.seafile.com/api2/repos/

and the parameter is

-d "name=new_repo"

Could somebody please point me to the sources for this documentation? I didn’t find it on github.

TIA,
Joe

1 Like