Json, REST and Zendesk

Many of us have been using XML and SOAP for a long time now. This time my task was to create tickets in Zendesk based on events in NAV. I soon discovered that Zendesk uses REST web services and that it talks Json…. 😯

I soon found Gunnar Gestssons blog post on “JSON meets NAV“. Many thanks to Gunnar for doing the hard work! All I did was some tweaking to make it work with Zendesk.

On the link below you’ll find a textfile with two codeunits (99100 and 99101). 99100 is based on Gunnars work and in 99101 there’s some code which shows how to work with Zendesk. All you need to do is to setup a Zendesk trial account and do some setup there (more details in the documentation trigger in cu 99101). Then change some hard coded parameters in codeunit 99101 and you can create tickets in Zendesk.

I hope this can be useful for some of you guys out there. Enjoy!

Objects: Zendesk demo

Tags: , ,

One Response to “Json, REST and Zendesk”

  1. Anant 2019-08-16 at 10:39 #

    Hi Lars,

    Many thanks for the example. I have tried running it and have entered my username/password but keep running into this error:

    “A call to System.Net.HttpWebRequest.GetResponse failed with this message: The request was aborted: Could not create SSL/TLS secure channel.”

    Did you encounter this issue by any chance?

    Things I have tried already:
    1) Followed this tutorial: http://navcraft.fr/nav-http-web-request-ssl-validation/
    It essentially by passes the SSL authentication and assigns it to tls1.2.

    But it hasn’t worked. Any help would be greatly appreciated!

    Many thanks,

    Ananta

Leave a Reply