Skip to content

Instantly share code, notes, and snippets.

@andresbravog
Last active August 29, 2015 14:04
Show Gist options
  • Save andresbravog/fb0c092621de6885bda7 to your computer and use it in GitHub Desktop.
Save andresbravog/fb0c092621de6885bda7 to your computer and use it in GitHub Desktop.
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
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