Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2025 05:34 AM
Thanks for the reply, @szymon_dybczak and @lingareddy_Alva.
I tried both approaches but none was successful.
url = f'{account_url}/api/2.1/accounts/{account_id}/budget-policies'
filter_by_json = json.dumps({"policy_name": "aaaa"})
params = {"filter_by": filter_by_json}
headers = {
'Authorization': f'Bearer {TOKEN}',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.get(url=url, headers=headers, params=params)params = {"filter_by":{"policy_name":"aaes"}}
response = requests.post(url=url, headers=headers, data=json.dumps(params))For the post method, I tried with and without the "/list" at the end of the endpoint.
With it I got an ENDPOINT_NOT_FOUND error
Without it, the INVALID_PARAMETER_VALUE error, probably because this endpoint with POST method is to be used to create a new budget policy
'error_code': 'INVALID_PARAMETER_VALUE', 'message': 'Invalid policyName - policy name cannot be empty'