Skip to main content


I'm trying to convert our 1.0 code over to 2.0 and the JSON data structures seemed to have changed and when I went to the samples I found that the number of 2.0 samples are very slim and not very helpful.  They are basically just an incomplete codification of some of the curl requests in the API documentation and I've not found any PHP one that really shows any data handling.


The initial API samples seemed to have a little more meat to them them where the 2.0 ones are barely squeaking by and require some additional parameters to even make them work (I had to disable some SSL verification through curl options to make the PHP ones work.)


It would be nice if many of the samples were expanded to do more than just mimic the get commands and went a step farther and stepped through some of the returned arrays demonstrating how to address the elements.  


I'm presently working on one to list the members of a specified group recreating an API 1.0 function we have in a production application (adds/removes users to/from a group) and code that previously worked with the returned data does not even after changing the 'agents' to 'agent_ids'. 


I have a number more to do and find the API documentation and samples to be rather frustrating considering this is a forced migration as the 1.0 version is apparently going to be taken out of production.



You are right, the v2 samples are currently designed only to provide examples of how to make the API calls and not deal with the response. Since error handling was an area that we improved in the v2.0 APIs, the samples also show how to check for the right HTTP status and how to retrieve the X-request-ID header if you need to contact us for support. 


The JSON data in the response has changed slightly i.e the outer element has been removed so I understand that this can be confusing. We will look to add a few samples to show how you can iterate through the response in PHP. If you can elaborate a bit more on what you will like to see in the samples, we will use the feedback to make the samples more useful.


We plan to keep the v1 around until the end of the year, I hope that this is sufficient time to migrate from v1 to v2.