Datasnipper script. Worked on Migration tool a bit. Some Templates.
This commit is contained in:
@ -38,7 +38,7 @@
|
||||
<img
|
||||
alt="Walmart Supplier Academy"
|
||||
class="np-header-logo-image"
|
||||
src="https://www.filepicker.io/api/file/Vjxp2PQoT72kwNDqesZN?policy=eyJleHBpcnkiOjE3MjQ1NjcyNTYsImNhbGwiOlsiY29udmVydCIsInBpY2siLCJzdG9yZSIsInJlYWQiXX0=&signature=baec57606a43df47416e2e40fdc152f3de3b78fd32c86e28d452bef4fec0f074&cache=true"
|
||||
src={{ current_school.logo_url }}
|
||||
/>
|
||||
</a>
|
||||
<div class="header-dropdown-container np-hidden-mobile">
|
||||
|
||||
Binary file not shown.
35
Scripts/API_Tests/multi_group_reduce_to_one.py
Normal file
35
Scripts/API_Tests/multi_group_reduce_to_one.py
Normal file
@ -0,0 +1,35 @@
|
||||
import pprint
|
||||
import Apikeys
|
||||
import requests
|
||||
|
||||
APIKEY = Apikeys.DATASNIPPER
|
||||
BASEURL = "https://api.northpass.com/v2"
|
||||
HEADERS = { "content-type": "appliation/json", "X-Api-Key": APIKEY }
|
||||
PP = pprint.PrettyPrinter(indent=4)
|
||||
ALL_LEARNERS_GROUP = "2e274dc7-3abe-4575-8b3d-0c8e73a09f44"
|
||||
|
||||
def grab_people():
|
||||
count = 0
|
||||
while True:
|
||||
count += 1
|
||||
url = f"{BASEURL}/people?page={count}"
|
||||
get_response = requests.get(url, headers=HEADERS)
|
||||
resp = get_response.json()
|
||||
nextlink = resp["links"]
|
||||
|
||||
for peeps in resp["data"]:
|
||||
id = peeps["id"]
|
||||
email = peeps["attributes"]["email"]
|
||||
groups = peeps["relationships"]["groups"]
|
||||
if len(groups['data']) >= 2:
|
||||
for y in groups['data']:
|
||||
if ALL_LEARNERS_GROUP in y['id']:
|
||||
print(email, id)
|
||||
# if 'ecb95453-7196-4392-8a24-392bf14b0480' in y:
|
||||
|
||||
|
||||
if "next" not in nextlink:
|
||||
break
|
||||
|
||||
if __name__ == "__main__":
|
||||
grab_people()
|
||||
4
Todos.md
4
Todos.md
@ -419,3 +419,7 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th
|
||||
## 08-23-2024
|
||||
|
||||
- [ ] WMTSupplier - Send notes on how a CE team should be staffed - content creator, support facing, etc. Include numbers.
|
||||
|
||||
## 08-30-2024
|
||||
|
||||
- [ ] Datasnipper - Run script for if anyone with > 1 group, remove from all groups and enroll in client group.
|
||||
|
||||
Reference in New Issue
Block a user