Add discussion_id to notes REST API, and accept for POST
Problem to solve
Notes have discussion_id, but this is not exposed in the REST API, either on read or write (see docs). We should support this.
Intended users
Anyone using the REST API - primarily Sasha (Software Developer) and [Devon (DevOps Engineer)].
Further details
This would allow our users to write integrations that use our full set of features.
Proposal
Modify the notes API handlers (lib/api/notes.rb) to support accepting discussion_id as a parameter, and returning it in the response.
Permissions and Security
We will need to ensure that the discussion referenced it actually on the parent, and that the user has the right to view it.
Documentation
This will require changing the public API documentation
Testing
This involves adding a new field, which means the risk is lower than removing a field. The functionality for this already exists, but it is not exposed.
What does success look like, and how can we measure that?
When a user can display view the discussion_id from an API response, and add a note to a discussion directly using the API.
What is the type of buyer?
Any user who has access to discussions.