1
0
-1
I want to search for animalSpecies.  I found this sample search query listed on one of your pages, but I don't understand what the token and tokenHash is for.  I normally use my apiKey and for objectAction I use publicSearch.

 

{
    "token":"{{token}}",
    "tokenHash":"{{tokenHash}}",
    "objectType":"animalSpecies",
    "objectAction":"search",
    "search":
    {
        "resultStart": "0",
        "resultLimit": "100",
        "resultSort": "speciesSingular",
        "resultOrder": "asc",
        "filters":
        [
            {
                "fieldName": "speciesSingular",
                "operation": "equals",
                "criteria": "Dog"
                 
            }
        ],
        "filterProcessing": "1",
        "fields":
        [
            "speciesID","speciesSingular","speciesFullname"
        ]
         
    }     
}
    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Angelina,

      The token and tokenHash are used when you are trying to use a private (authenticated) action with the API.  Since you are only using and apiKey you shouldn't use the token and tokenHash.  Use the apiKey and the public action instead to access public data.

      Please note there isn't a publicSearch on the animalSpecies object, online publicList:

      Object definitions#animalSpecies

      Richard

      1. Angelina R

        Hi Richard,

        What is the difference between the options "Define" and "Public List"?

         

        Angelina

      CommentAdd your comment...