Beginner to write a macro for a particular function

Hello,

I am really new to this. Also I haven’t programmed Java for over 15 years… sorry. jobs don’t need Java.

Now, I would like to extend my Confluence Server 7.19.16.

What I would like to do is to place a button on a page under a space. Clicking upon this button, it will call a standard Confluence REST end point, and create a subpage with a calculated page title such as “2024-09-18-01-59-34”.

Browsing the community I come across a few posts such as this and this.

I’m using Postman to send this JSON to the REST end point and it works well.

{
  "type": "page",
  "title": "2024-10-17-13-43-46",
  "ancestors": [
    {
      "id": "106530463"
    }
  ],
  "space": {
    "key": "Patients"
  },
  "body": {
    "storage": {
      "value": "",
      "representation": "storage"
    }
  }
}

Can someone give me some starting points?