Problem with API request - custom fields Answered

Tango Deploy

Hi! I am having issues with getting data for custom fields that we have in Totango. I follow this instructions
https://support.totango.com/hc/en-us/articles/204174135-Search-API and it is working for sample data but we store some data in custom fields as well.

I do not know how pass them into data parameter. For example we have custom field for `timestamp`, how can I use it in part for query? Can I query all possible data without writing them in API call?

'query={
"terms":[
{"type":"string","term":"status_group","in_list":["paying"]}
],
"count":1000,
"offset":0,
"fields":[
{"type":"string","term":"health","field_display_name":"Health rank "},
{"type":"health_trend","field_display_name":"Health last change "},
{"type":"string_attribute","attribute":"Success Manager","field_display_name":"Success Manager"}
],
"sort_by":"display_name",
"sort_order":"ASC",
"scope":"all"
}'
0

Comments

1 comment

  • Comment author
    Amit Bluman
    • Official comment

    Hi,

    You can fetch and query every field Totango store using Search API.
    I assume that the 'timestamp' field is your own custom field sent to Totango.
    This is an example of how to use 'timestamp' as a query term and as a field:

    BTW, the easiest way to create a search query is to use the Totango UI and copy the resulting API call.
    Follow these to copy the API endpoint: 

    1. Create a new segment.
    2. Add filters & columns to match your desired search parameters.
    3. Generate the API endpoint and copy the code






    Hope that's helpful,

    Amit

Please sign in to leave a comment.