require 'net/http'
uri = URI('http://example.com/api/v1/data?api_key=API_KEY')
req = Net::HTTP::Post.new(uri)
req.body = File.read('json_file.json')
req.content_type = 'application/octet-stream'
res = Net::HTTP.start(uri.hostname, uri.port) {|http|
http.request(req)
}