Help

Re: Build query to trim the data returned

771 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Charles_Haughey
4 - Data Explorer
4 - Data Explorer

It was referencing the Api for the ‘Favorite Movies’ demo database.

To test and learn the api, I was trying to retrieve data from the
table Movies and only bring back a description of the movie The
Godfather.

I tried various codes using the method ‘Query Parameter’ (airtable’s
description with this name inside the api) see below:

https://api.airtable.com/v0/appID/Movies?fields[The%20Godfather]=Description&api_key=MyKey

I tried other possibilities but I was returned an error or the
descriptions of all the movies in the table.

2 Replies 2
Peter_Todd1
5 - Automation Enthusiast
5 - Automation Enthusiast

@Charles_Haughey

Maybe something like:

https://api.airtable.com/v0/_YourAppID_/Movies?fields[]=Description&filterByFormula=(Name="The Godfather")&api_key = _YourAPIkey_

however this will still return the hidden id and createdTime fields, by design I think?

I must admit that I have struggled with the syntax, a bit more documentation with examples would help.

Charles_Haughey
4 - Data Explorer
4 - Data Explorer

Hi Peter,

Thank you for your reply.
I got this to give back something, though it was empty.
https://api.airtable.com/v0/MyAppID/Movies?filterByFormula=FIND("The%20Godfather"%2C"Name") &api_key...
I think all has to be urlencoded.
This might help: http://www.urldecoder.org/
And this:https://en.wikipedia.org/wiki/Query_string

Yes I agree with you on the Doc examples… incomplete.

The filterByFormula definitely could do with more info and examples.

See Below

FIND(stringToFind, whereToSearch[startFromPosition])

Finds an occurrence of stringToFind in whereToSearch string starting from an optional startFromPosition.
FIND(“fox”, “quick brown fox”)

=> 13

My test query above uses this but I am unsure what to put in 'whereToSearch[startFromPosition]

If I use Name I receive an null response, but at least not an error where if I try other guesses I receive errors.

Anyway please continue to share with me your discoveries

Charles