Skip to content

How to send 'filterGroupBy' via python requests? #2506

Answered by alexzhc
alexzhc asked this question in Q&A
Discussion options

You must be logged in to vote

I've figured it out: it turns out python request cannot pass a nested json, so one has to flatten it out as:

params = {
    		"subject": [
          		"wyusera-wenyanzuhu"
            ],
			"groupBy": [
				"vm_name"
			],
			"filterGroupBy[vm_name]": "matest",
			"from": "2025-03-21T07:00:00Z",
  			"to": "2025-03-21T08:00:00Z",
			"windowTimeZone": "Etc/GMT-8",
  			"windowSize": "DAY",
      }

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tothandras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant