Add Custom Field Option VIA API

Hello, thanks in advance for the assistance on this.
I have an idea but i am not sure where to start on this. I am trying to implement a process where a user can add/enable/disable/delete options from custom fields. To make changes to a custom field in JIRA you need to be an ADMIN. But i want to devise a way to give a user the ability to do this without granting the user directly admin privileges

The options i have thought of so far are to build a custom plugin to perform this. With this i can potentially add a tab in JIRA to make it easily accessible to the user
I am thinking of granting a service account admin privilege and find a way for the process to be triggered by the user while using the service account credentials (this being hidden to the user of course)
My other option is to build a rest endpoint in scriptrunner to perform this. The same logic will apply.
Is this something that is possible at all? What are my options? I am very new to atlassian development in general but i manage with research and a little help

Please assist and provide me with inputs. Thanks a lot!

We wrote a plugin for this, so it’s definitely possible.

Basically you write a wrapper around OptionManager and OptionService. We added our own database tables to associate Project’s to Custom Field Configuration Schemes or Field Layout Schemes, so that we could enforce our own version of Permissions.

This wrapper is exposed on a REST Plugin Module with various POST or GET methods.

Then we wrote various servlets that are in the Project Admin area to view and edit options, whether or not the field is required, the field description, etc and so forth.

You could also use Scriptrunner REST Endpoints, but that’s more of a script than a real plugin.