How to retrieve all commits for a file in Gitlab

I am able to retrieve the commits for a file using the below URL.

But adding the optional parameter all, ends up with empty array.

Calling with just path will get me latest results ? and is all not for all commits across branches. I thought if ref_name is not passed it takes the default. I tried the above apis with ref_name too but the same responses.

I checked further for few of the other project files, adding all gets me back lesser results as compared to without all parameter.

I think you have to url-encode the value of the path-param: