I’ve been working with the Platform CLI, however I’m unable to understand what the ‘get’ property on a ‘resource’ is used for and why I need to define it. Initially thought it would be used similar to a search, but it doesn’t seem to
I’ve been referencing the ‘get’ property within resource schema: https://email@example.com/packages/schema/docs/build/schema.md#resourceschema
This question is similar to a closed issue:
Best answer by shalgrimView original
Great question. First, I want to make sure you realize it’s optional, and you don’t need to define it.
As you can see from that documentation, it’s code that goes and gets a single example of that resource from the API. Most APIs, of course, provide this functionality to retrieve one specific item, usually by that item’s ID.
It’s useful in terms of Zapier’s platform in two places:
Since many APIs aren't 100% consistent in the data/fields that are returned by those two possibilities, we always perform a "get" afterwards, so that we then guarantee the same/consistent data is returned.Thus:
Hope that clears that up. Let us know if you have any more questions!
Understanding the GET calls are happening in the background after those operations occur is exactly what I was wanting to understand.