Last active
August 29, 2015 14:04
-
-
Save andresbravog/fb0c092621de6885bda7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json \ | |
-H "Content-Type: application/json" \ | |
-d '{"ticket":{"status":"solved", \ | |
"comment":{"public":true, "body": "Thanks, this is now solved!"}}}' \ | |
-v -u {email_address}:{password} -X PUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rest_client' | |
subdomain = 'redboothconnector' | |
id = 3 | |
email_address = '[email protected]' | |
password = 't3stz3nd3sk' | |
resource = RestClient::Resource.put( "https://#{subdomain}.zendesk.com/api/v2/tickets/#{id}.json", { :user => email_address, :password => password}) | |
resource.post( | |
{ | |
"ticket" => { | |
"status" => "solved", | |
"comment" => { | |
"public" => true, | |
"bady" => "Thanks, this is now solved!" | |
} | |
} | |
}.to_json, | |
:content_type => :json, | |
:accept => :json | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment