How I can get dicussion_id from api?

I want to use api to create MR discussion, and add note to same discussion.

The api doc shows dicussion_id is required for adding note, and it is Integer
However, as example Discussions API | GitLab

the id fetch is sha:

    "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
    "individual_note": false,
    "notes": [
        "id": 1126,
        "type": "DiscussionNote",
        "body": "discussion text",

There is no thread id or discussion id I could find

I tried to supply sha in place of discuss_id for API: Discussions API | GitLab

however, instead of create note from existing thread, it creates new thread instead