Create new auto-complete confluence macro

Hi,
I want to create a new macro which calls my application api to search and that search result should show in autocomplete(in parameter area). Attaching sample UI design for it. Can anyone guide me here.
image

Hi
Is this for server/dc or for cloud?
For server/dc you can check Custom Macro Parameters | JavaScript | Praecipio Consulting
Fo cloud, you can have a completely own macro editor - Macro custom editor with Confluence Connect

Alex

Hi @sash011 this is for server/dc. The auto-suggest list will be coming from another macro/rest api which I created in the plugin.
For example: I am my application which has search API, so I have create one rest API(https://testconfluence.synnex.org//rest/api/1.0/my-search/{titleSearch}) in the confluence plugin which is calling my api and returning the search result as list.