Will an item update done via the API trigger hooks?

Comments

15 comments

  • Shahil Sham

    The infinite loop ends up in using up the rate limit.

    0
    Comment actions Permalink
  • Christian Holm

    Hi Shahil

    I will add a parameter to the item API methods so you can disable hook calls for your change. I will let you know when it is ready.

    Christian

    0
    Comment actions Permalink
  • Shahil Sham

    Awesome, waiting for your update.

    Thanks a ton. :)

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    In the mean time you can look for the created_via on the lastest revision to see who made the update and halt if it was your own integration.

    /Andreas

    0
    Comment actions Permalink
  • Christian Holm

    Hi again

    The item create, update and delete methods now have a "hook" parameter, you can set to false to avoid hook calls.

    Christian

    0
    Comment actions Permalink
  • Shahil Sham

    Thank you very much for the feature.

    0
    Comment actions Permalink
  • Shahil Sham

    Also, thanks Andreas, for suggesting the workaround.

    0
    Comment actions Permalink
  • Sarah Zumwalde

    Has this "hook" parameter been added in the Java wrapper?

    Thanks in advance!

    0
    Comment actions Permalink
  • Tavis Gustafson

    Could someone post an example of using the hook parameter in a php item delete call ?  Does the hook parameter go in the options array or the attributes array or what ? 

    https://developers.podio.com/doc/items/delete-item-22364

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    It's a little unclear, yeah. Hook and Silent parameters always to into the options array in podio-php

    /Andreas

    0
    Comment actions Permalink
  • Sarah Zumwalde

    I can see the Silent parameter in the Java API client for item create, update, and delete; however, I do not see the Hook parameter. Is it possible for hooks to be disabled if the Hook parameter is added in the same way as the Silent parameter in podio-java? Why does podio-java include the Silent param and not the Hook?

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    Hi Sarah,

    The hook parameter was introduced much later than silent and was probably just never added to the java client. Should be simple to add yourself. If you're feeling adventurous you can make the change and create a pull request on github so we can get it added to the main repository. :)

    /Andreas

    0
    Comment actions Permalink
  • Sarah Zumwalde

    Thank you again Andreas and Christian for your help!
    The hook parameter is now available in the Java wrapper for item update.
    https://github.com/podio/podio-java/pull/8/files
    All the best!

    0
    Comment actions Permalink
  • Ansar Muhammad (Anz)

    Hi Christian,

    It seems like "file.change" API is not considering the hook => false parameter and triggering further hooks. Can you please check this

    3
    Comment actions Permalink
  • Ansar Muhammad (Anz)

    Hi Christian,

    Can you help on this. We are working on an integration which needs the file.change hook work proper with this parameter. The work around suggested by Andreas will not be helpful for us in some cases.

    Thanks
    Anz

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk