What is the best way to sychronize Jira server issue with external application

Hi,
I want to sychronize jira server issue (labels, attachements, …) with labels and attachements of my external java application (two-way-sync)

What is the best way to do it:

  • use webhook
  • use jira server plugin

any tutorials, documentation links ?