8 years ago
Ruby - Rest API - Easier signing! Ruby - Windows and Linux compatible
So this is less of an ask the community and more of a show the community.
Ive written some Ruby code that makes it much much easier to use the LogicMonitor API.
It does all the signing for you so you can just focus on your API calls and worry less about the secure signing.
https://gist.github.com/ITJamie/4937de9139c682c02c34ff2d17051d58
It uses the following rest-client library https://github.com/rest-client/rest-client and injects the authentication method into the rest-client library. Ive included some examples of usage in my gist. Let me know if your having difficulty and i will test and patch as needed
For an example of how easy this makes using the Rest API
temp_url = @URL + '/service/services'
response = RestClient.get(temp_url)
# Printing API server response
puts "\nServer response: #{response}"