Skip to content

Notes API docs unclear on the body parameter

Problem to solve

In this comment @johannes.wienke noted https://docs.gitlab.com/ee/api/notes.html could do a better job:

The documentation is not very clear on that body means a query parameter in case of a POST request. And an explanatory message like "Query paramter body is missing" might have prevented the whole issue up front.

@phikai provided this help:

For example:

curl --request POST --header "PRIVATE-TOKEN: <<your_access_toke>" "https://gitlab.com/api/v4/projects/XXXXXXX/merge_requests/XX/notes?body=note"

The 400 error response you're getting is because you're sending a bad request to the API and it doesn't know how to handle that.

Let's see about making this better.

Further details

Proposal

Who can address the issue

Other links/references

Edited by Amy Qualls