Chubb changes for their access agents push.
This commit is contained in:
25
Scripts/API_Tests/get_people_and_props.py
Normal file
25
Scripts/API_Tests/get_people_and_props.py
Normal file
@ -0,0 +1,25 @@
|
||||
import requests
|
||||
import Apikeys
|
||||
|
||||
APIKEY = Apikeys.EMPLOYINC
|
||||
BASEURL = "https://api.northpass.com/v2/people/"
|
||||
|
||||
HEADERS = {
|
||||
"accept": "application/json",
|
||||
"X-Api-Key": APIKEY
|
||||
}
|
||||
|
||||
def people():
|
||||
count = 0
|
||||
url = f"https://api.northpass.com/v2/people?page={count}"
|
||||
count += 1
|
||||
response = requests.get(url, header=HEADERS)
|
||||
respon = response.json()['data']
|
||||
|
||||
person_uuid = respon['id']
|
||||
person_status = respon['attributes']['registration_status']
|
||||
person_tuple = (person_uuid, person_status, '')
|
||||
|
||||
propurl = "https://api.northpass.com/v2/properties/people"
|
||||
prop_payload = { }
|
||||
|
||||
Reference in New Issue
Block a user