You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

how can I add a filter to a report when querying via python request

Accepted answer
24
Views
2
Comments
edited Nov 13, 2018 12:40PM in Integrations and APIs 2 comments

Summary

I'm able to get a report but I can't change the filter of it

Content

Hi,

I use:

import requests as r

url= 'https://****.custhelp.com/services/rest/connect/v1.3/analyticsReportResults';
r_get = r.post(url, json = {"id": 103582} , auth=('user', pw)).json()
print(r_get)

to successfully receive the fist 10k lines of a report. I tried to add a filter like:

r_get = r.post(url, json = {"id": 103582, "filters" : [{"name": "Created","operator": [{"id": 9}],"values": [{"0": "1541673423","1": "1541673423"}]}]} , auth=('user', pw)).json()

or similar but I only get: "A problem setting a property was encountered: Invalid ObjectType: 6" or "Invalid property specified:.."

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!