Zenjob notes. Webhook testing and python scripts.
This commit is contained in:
@ -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):
|
||||
|
||||
29
Scripts/API_Tests/workato_for_test.py
Normal file
29
Scripts/API_Tests/workato_for_test.py
Normal 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)
|
||||
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user