Issue with "POST /projects/:id/repository/commits/:sha/comments" API

We are using self managed GitLab Community Edition 13.2.1 running on a linux platform.

My Requirement : I need to place inline comments on files/resource/source files.
These files are placed at :
Root level of the Project
Under folder of a Project
Under multi-level folders of the Project.

I use the API as a curl command (followed - Commits API | GitLab) :

curl --request POST --header “PRIVATE-TOKEN: <my_access_token>”
–form “note=Please capture every minute details of the API.”
–form “”
–form “line=25”
–form “line_type=new” /1bcc8b3e585aa729dbaa38d8e8a2b86d38fa1926e/comments”

The file is in the root, the above API call places the inline comment on the right file and on the correct line number.

However, when I try place comments on a file that is under any folder, multilevel folders, the above API call fails. In the response I see - “path”:null,“line”:null,“line_type”:null

Below is the screenshot of my Repo:


I cannot place any inline comment for and pom.xml files.

Below are formats that I have tried with the path parameter;

–form “path=EventProcessorSample/”
–form “”
–form “”
–form “path=my-personal-stuff/EventProcessorSample/”
–form “path=/my-personal-stuff/EventProcessorSample/”
–form “”

However all of the above resulted with same results - “path”:null,“line”:null,“line_type”:null

Could you please help me with the right usage of the API and the parameter.
When i want to place inline comments for a source file under multilevel folder, how will construct the parameter
Also, When I want to place multiple in-line comments on to a single file, how will I go about it.

Looking forward for some leads.

Thank you
Mahesh Maney