1 answer
- 210
Natalie,
You should use the fieldName animalSpecies (not speciesSingular). Can you tell me where you saw speciesSingular being used in an animal publicSearch?
{ "apikey":"*****", "objectType":"animals", "objectAction":"publicSearch", "search": { "resultStart": "0", "resultLimit": "10", "resultSort": "animalID", "resultOrder": "asc", "filters": [ { "fieldName": "animalSpecies", "operation": "equals", "criteria": "Dog" } ], "fields": ["animalID","animalSpecies","animalOrgID","animalLocation","animalName"] } }
Thanks,
Richard
- Richard [RG]
Just for clarification -- you don't have to specify the filterProcessing value if all of your filters are "and". So in most cases you probably don't have to provide the filterProcessing value.
- Natalie
Hey Richard, that fixed it! Thanks so much for the speedy response! I saw speciesSingular here: https://userguide.rescuegroups.org/display/APIDG/Sample+API+requests#SampleAPIrequests-animalSpecies Also, just so you know, you have a live apikey here: https://userguide.rescuegroups.org/display/APIDG/Sample+API+requests#SampleAPIrequests-publicSearch.3
Add your comment...
Hello. I'm trying to get this code to filter species of animals, and it never seems to work. I still get back cats other animals. What am I missing here?