It seems that the API returns a response with a Content-Type different from application/json. You can check that by printing:
puts result.content_type
If so, the HTTParty parser may be interpreting the response as a plain text; And, thus, the code result[0]['param1']
evaluates to nil
Maybe you can try to parse the desired value into @a
with:
@a = JSON.parse(result)[0]['param1']
Don't forget to require the json library
require 'json'
Good luck!