Changed some migration scripts. Getting closed! Walmart notes.
This commit is contained in:
@ -27,3 +27,4 @@ SANDATA = "HdZFoXGCFpt8NnTOzIQY0kVDj"
|
||||
LUMINATE_US = "p5fidpuedHaOlPnd8EcpxzQMG"
|
||||
SKAN = "89qJQDaFl3DvIpSSOUC5PM9V6"
|
||||
KARBON = "peQbnkfUnYLGPfIzyCxfLs634"
|
||||
BLOOMERANG = "ewGDqLgsklMnytqzUka2wmgIi"
|
||||
|
||||
Binary file not shown.
@ -7,13 +7,13 @@ import Apikeys
|
||||
import time
|
||||
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
APIKEY = Apikeys.CHUBB
|
||||
APIKEY = Apikeys.BLOOMERANG
|
||||
HEADERS = {
|
||||
"accept": "application/json",
|
||||
"X-Api-Key": APIKEY,
|
||||
}
|
||||
BASEURL = "https://api.northpass.com/v2/"
|
||||
IMPORTFILE = "/Users/normrasmussen/Downloads/CISA OLC Users 072924-080924.csv"
|
||||
IMPORTFILE = "/Users/normrasmussen/Downloads/bloomerang-mass-import.csv"
|
||||
|
||||
|
||||
def bulk_invite_and_group():
|
||||
@ -55,14 +55,14 @@ def bulk_invite_and_group():
|
||||
for person in people:
|
||||
miniload = {"email": person, "groups": group}
|
||||
payload_1.append(miniload)
|
||||
# print(f"The {group} payload has {len(payload_1)}")
|
||||
print(f"The {group} payload has {len(payload_1)}")
|
||||
payload = {"data": {"attributes": {"people": payload_1}}}
|
||||
response = requests.post(url, headers=HEADERS, json=payload)
|
||||
print(f"Completed. Status code is {response.status_code}")
|
||||
print(response.text)
|
||||
print("Running add props from func...")
|
||||
time.sleep(3)
|
||||
add_props_from_func(people, data, group)
|
||||
# print("Running add props from func...")
|
||||
# time.sleep(3)
|
||||
# add_props_from_func(people, data, group)
|
||||
|
||||
|
||||
def add_props_from_func(people, data, group):
|
||||
|
||||
Reference in New Issue
Block a user