pgericson/zendesk-api — pull request #16 by nathanl (2012-03-16 12:56:13+00:00)
Title: Update API URLs

Zendesk has changed their API. Our experience was that when we tried to hit a search API URL like `http://myapp.zendesk.com/search?query=foo&format=json`, instead of a JSON response, we got an HTML response stating that we were being redirected to `https://myapp.zendesk.com/api/v1/search?query=foo&format=json`. This broke our search function.

This pull request updates the gem to allow users to specify an API version, which will then be used to construct a working URL.

The response I got from Ted Barnum with Zendesk help regarding this issue follows. Note that although he says the old path will continue to work, this was not the case for the search api (I'm not sure about others).

==========

"Any 'classic' API call that returns a deprecated notice and a new path such as /api/v1/tickets means that API has been ported to the new path and should be used with the new path. The old path will continue to work for some time to allow customers to adjust their scripts. Note that it may be that not all API calls have been ported and so some may still use the 'classic' path. Those will not return a deprecated notice yet, but are expected to be ported in the near future. The form and function of the calls has not otherwise changed unless announced in our forums.

Further, a new API (v2) is in development and will have a different syntax and/or functionality, but I have no information on when it will be completed.

https: is preferred in making API calls to avoid sniffers, and if your zendesk account is not setup to use SSL a call to https: will now work:
https://support.zendesk.com/entries/20739963-api-voice-fixes
I'll add this, that if your account has SSL enabled, that the API call must be via SSL.