Created script to get sent webhooks from our endpoint. Not many filtering options. Update some templates for Spark, and Luminate.
This commit is contained in:
17
Scripts/API_Tests/get_sent_webhooks.py
Normal file
17
Scripts/API_Tests/get_sent_webhooks.py
Normal file
@ -0,0 +1,17 @@
|
||||
import requests
|
||||
import Apikeys
|
||||
import pprint
|
||||
|
||||
PP = pprint.PrettyPrinter(indent=4)
|
||||
APIKEY = Apikeys.LUMAFINTECH
|
||||
HEADERS = {"content-type": "application/json", "X-Api-Key": APIKEY }
|
||||
BASEURL = "https://api.northpass.com/v2/webhooks"
|
||||
FILTURL = f"{BASEURL}?filter[attempt_left][eq]=28"
|
||||
# filter[type][in]=course_completed_events
|
||||
|
||||
print(FILTURL)
|
||||
response = requests.get(FILTURL, headers=HEADERS)
|
||||
resp = response.json()
|
||||
for i in resp['data']:
|
||||
print(i['attributes']['created_at'] )
|
||||
# PP.pprint(resp)
|
||||
Reference in New Issue
Block a user