Question

How is the 'get' key of a resource schema used?

  • 17 November 2021
  • 0 replies
  • 38 views

Hello,

Looking at the possible keys/functions that one can define in a resource schema (spec here), there is the `get` one (alongside the typical `list`, `create` and `search`...) and when looking at some of the example apps from the platform, I see that function described as:

// The get method is used by Zapier to fetch a complete representation of a record. This is helpful when the HTTP
// response from a create call only return an ID, or a search that only returns a minimuml representation of the
// record. Zapier will follow these up with the get() to retrieve the entire object.

 

In the recipe.js example here

This seems to pass validation and all that, but does not show up as a trigger or action, and I am confused as to how that is (or can be) used. Is that something that is called automatically if an element only has 1 attributes? 

I’m asking because the API I’m integrating with has the ability to dynamically specify which fields to return, so I was thinking that I could build the normal triggers to only return id and updated_at, and always have that extra step of a `get` request asking for the necessary fields out of the changed `id` item. 


0 replies

Be the first to reply!

Reply