Snjezana:

In the future, please open an API request for things like this. If you never open API requests, then the API stays incomplete for clients. In the future you will need to continue to update this code unless new API is added. So you should definitely be opening API requests. 

Please perform the following actions:
1) Open a jira to 'server' with the API request
2) Open another jira linked to 1) to clean up the code in central to use the new API. 

When APIs are insufficient, you should be actively trying to get them fixed, suggesting solutions, or at the very least REQUESTING that they be fixed or improved.