can you tell me a little bit about our use case?
The gateway as such is not an api command, and is not returning any WorkItem, therefore API is not supported.
What you always can do is executing the local Gateway like any other executable that you have at your local PC, with plain java commands. (thats what I do in my own CustomGateway app)
Does this help?