Zenjob notes. Webhook testing and python scripts.

This commit is contained in:
Norm Rasmussen
2023-12-06 16:28:43 -05:00
parent 54cddb23f1
commit f7e0a20cf3
4 changed files with 40 additions and 7 deletions

View File

@ -48,7 +48,8 @@ def getfromEmail(BASEURLEMAIL, APIKEY):
# print(response)
email = response["data"]
# print("Learner ID:" )
pp.pprint(email)
#pp.pprint(email)
print(email)
def getfromUuid(BASEURL, APIKEY):

View File

@ -0,0 +1,29 @@
import json
import pprint
import requests
import Apikeys
BASEURLEMAIL = "https://api.northpass.com/v2/people?filter[email][cont]="
APIKEY = Apikeys.DATASNIPPER
def getfromEmail(BASEURLEMAIL, APIKEY):
email = "datasnipper.com"
url = BASEURLEMAIL + f"{email}"
headers = {
"accept": "*/*",
"x-api-key": APIKEY,
"content-type": "application/json",
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print("200 Error!")
else:
print("Another Error!")
# response = response.json()
email = str(response.text)
input_json = json.loads(email)
for item in input_json["data"]:
print(item["id"])
if __name__ == "__main__":
getfromEmail(BASEURLEMAIL, APIKEY)

View File

@ -5,11 +5,11 @@ URL = "https://webhooks.workato.com/webhooks/rest/3aa0af60-6363-4cc6-9f2a-34b9e1
DATA = {
"payload": {
"company": "MJ CPA AUDIT & TAX (RSMA)",
"company": "ExampleCompany1",
"package": "Advanced",
"segment": "",
"industry": "ACCOUNTING",
"company_domain": "mjcpa.com",
"segment": "exampleSegment",
"industry": "INDUSTRIAL",
"company_domain": "example_company.com",
"health_category": 1,
"contract_expires": 1716768000000,
"onboarding_stage": "Start",