Zenjob notes. Webhook testing and python scripts.
This commit is contained in:
@ -150,8 +150,11 @@ Thanks, Sophie, and Viky! Enjoy your vacation, Sophie! Talk to you when you retu
|
|||||||
Best,
|
Best,
|
||||||
Norm
|
Norm
|
||||||
|
|
||||||
## 10/11/2023
|
## 12/05/2023
|
||||||
|
|
||||||
### Sophie back from PTO
|
### Arun (Engineer) Questions
|
||||||
|
|
||||||
|
Unable to view assignment in API, but assignment shows up in Analytics
|
||||||
|
It was because he was previewing and submitting the assignment as a manager.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,8 @@ def getfromEmail(BASEURLEMAIL, APIKEY):
|
|||||||
# print(response)
|
# print(response)
|
||||||
email = response["data"]
|
email = response["data"]
|
||||||
# print("Learner ID:" )
|
# print("Learner ID:" )
|
||||||
pp.pprint(email)
|
#pp.pprint(email)
|
||||||
|
print(email)
|
||||||
|
|
||||||
|
|
||||||
def getfromUuid(BASEURL, APIKEY):
|
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 = {
|
DATA = {
|
||||||
"payload": {
|
"payload": {
|
||||||
"company": "MJ CPA AUDIT & TAX (RSMA)",
|
"company": "ExampleCompany1",
|
||||||
"package": "Advanced",
|
"package": "Advanced",
|
||||||
"segment": "",
|
"segment": "exampleSegment",
|
||||||
"industry": "ACCOUNTING",
|
"industry": "INDUSTRIAL",
|
||||||
"company_domain": "mjcpa.com",
|
"company_domain": "example_company.com",
|
||||||
"health_category": 1,
|
"health_category": 1,
|
||||||
"contract_expires": 1716768000000,
|
"contract_expires": 1716768000000,
|
||||||
"onboarding_stage": "Start",
|
"onboarding_stage": "Start",
|
||||||
|
|||||||
Reference in New Issue
Block a user