API2: search library by name bug

Hello,

I’m using the Web API v2 to search a library by name, but I’m only able to produce the following two resultsets:

1:
curl -H ‘Authorization: Token {token_here}’ -sS {url_here}/api2/repos/?nameContains=a’
This gives a response containing all of my libraries. Whatever keyword I use, it will not narrow down the list.

2:
curl -H ‘Authorization: Token {token_here}’ -sS {url_here}/api2/repos/?nameContains=a&type=repo’
This gives no results at all.

Is this a bug in the webapi or some missing documentation? Or perhaps I’m doing something wrong?

I’m using seafile server pro at the latest version 6.2.9

Using PRO v6.2.9

First working good. Keep in mind that it’s full text seach and is case-insensitive, so it look for library contains in name “a” and “A”.

Second:
@daniel.pan This I can confirm. Did test in first step with four chars and it return two expected libraries(both returned with type : "repo" after that I just added parameter &type=repo and it return empty array []. For sure try to add type as first param before nameContains and result is same as before.