Jump to content


Photo

API GET for Animal module

api zurmozoo

  • Please log in to reply
2 replies to this topic

#1 Jason Lee

Jason Lee

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 05 February 2014 - 06:28 AM

I want to use the api to get the variables of a entry from the custom animal module. I've setup the module as shown in the example http://zurmo.org/wik...stomizing-zurmo and it works.

 

The api also works with normal modules http://zurmo.org/wik...cation-contacts. But when I try the following example I always get an empty response http://zurmo.org/wiki/rest-api-specification-custom-models.

 

I think the problem might be in the controller name 

class ApiSampleModelApiController extends ZurmoModuleApiController

or the api call


$response = ApiRestHelper::createApiCall('http://zurmo_url/index.php/api/sampleModel/api/customGet/?id=' . $id, 'GET', $headers);

I've replaced SampleModel with Animal, it accepts the request but still returns nothing.

 

Is there anything else that needs to be modified to use the api with a custom module or maybe a tutorial on how to use the api with the zurmozoo animal module?

 



#2 Dino

Dino

    Member

  • Members
  • PipPip
  • 17 posts

Posted 25 June 2014 - 11:55 AM

having the same issue, any one found a solution for this? working example?



#3 windsor

windsor

    Advanced Member

  • Moderators
  • 272 posts
  • LocationTampa, Florida USA

Posted 24 July 2014 - 09:49 PM

The API controller in the Animal module was not updated to the 2.x release. 

 

So you would have to go in and make a bunch of changes using for example the API controller in the Account module as your guide.

 

BTW you may be interested in this project I am working on now..

 

 I'm going to be releasing an open-source tool ZAPI to make it a lot easier for working with the Zurmo API, I could use some help with testing as well as documentation and setting up the repo, wiki and issues list. Do you want to help out?  It may be a good way for you to get your head around how the API works.







Also tagged with one or more of these keywords: api, zurmozoo

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users