The REST API documentation about the "Set Pin Comment" method is incomplete

XMLWordPrintable

    • 9.12
    • 1
    • Severity 3 - Minor
    • 3

      Issue

      The REST API documentation about the "Set Pin Comment" method is incomplete.

      Documentation URL: https://docs.atlassian.com/software/jira/docs/api/REST/9.12.0/#api/2/issue-setPinComment

      In this documentation, there is no mention of the fact that, along with the PUT request, the "true" payload needs to be included in the request as "raw data". Without this payload, the REST API call does not work.

      As shown in the example CURL command below, we need to include the parameter --data-raw 'true' in the command for the call to wokr:

      curl -v -u username:password '<JIRA_BASE_URL>/rest/api/2/issue/{issueIdOrKey}/comment/{id}/pin' -X 'PUT' -H 'content-type: application/json' --data-raw 'true'
      

      If this parameter is missing, the comment will not get pinned, and the following error message will come back from the Jira application:

      {"errorMessages":["No content to map to Object due to end of input"]}
      

      Suggestion

      Fix the documentation by mentioning that 'true' parameter needs to be included in the PUT call as Raw Data.

            Assignee:
            Maria Sobińska
            Reporter:
            Julien Rey (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: