Cormac
01/22/2024, 11:58 AM| <flow-name>/<deployment-name> | asdfasdf-1111-xxxà |
Can someone please advise? this is extremely frustratingCormac
01/22/2024, 12:02 PMBianca Hoch
01/23/2024, 3:35 PMCormac
01/24/2024, 2:00 PMBianca Hoch
01/24/2024, 9:39 PMprefect cloud login -k <insert-api-key-here>
?Bianca Hoch
01/24/2024, 10:01 PMimport requests
import json
base_url="<https://api.prefect.cloud/api/accounts/[insert-your-account-id-here]/workspaces/[insert-your-workspace-id-here]>"
url=f"{base_url}/task_runs/filter"
apikey = "insert-your-api-key-here"
print(url)
headers= {
"Content-Type": "application/json",
"Authorization": f"bearer {apikey}",
}
json = {
"task_runs": {
"start_time" : {
"before_": "2023-04-27T10:15:22Z",
"after_": "2023-04-16T00:15:22Z"
}
}
}
try:
response = requests.post(url=url, headers=headers, json=json)
except Exception as e:
print(e)
#print (response.json())
results = response.json()
print(results[1])