f-string or a URL is not working as well as params is not constructing the URL and the results are not as expected
I am trying to pass two variables in query parameters.
Option 1:
f"https://apiproduct-hotfix.resilix.ai/api/v1/accounts/5d729b3f4556301143be5b58/engagement/cadence_executions?query={'entity_id': {patient_id},'cadence_id':{cloned_cadence_id}}"
is throwing
ValueError: Invalid format specifier
Option 2:
params = {'entity_id': {patient_id}, 'cadence_id': {cloned_cadence_id}} cadence_execution_url = (f"https://apiproduct-hotfix.resilix.ai/api/v1/accounts/5d729b3f4556301143be5b58" f"/engagement/cadence_executions") cadences_execution = requests.get(cadence_execution_url, headers=auth, timeout=3000,params=params)
is returning the cadences_execution.url as
https://apiproduct-hotfix.resilix.ai/api/v1/accounts/5d729b3f4556301143be5b58/engagement/cadence_executions?entity_id=64ea20f4038ca537b25577b3&cadence_id=64ea20f3c8f868262bb5a15c
and the query is not applied at all