As far as I know, it is not possible via REST API for Jira Server.
There is already an issue with this request. You can vote/watch the issue. https://jira.atlassian.com/browse/JRASERVER-36112
But you can use Java API either by building your own plugin or using Script Runner as @Kishan Sharma mentioned.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events