Started Harri script. Pushed groups for Anthology.

This commit is contained in:
Norm Rasmussen
2023-06-22 17:00:36 -04:00
parent a6f6ecf6cf
commit b89d88ffcd
6 changed files with 142 additions and 56 deletions

View File

@ -4,26 +4,39 @@ import Apikeys
apikey = Apikeys.anthology
groups_to_create = [
"Engage",
"Encompass",
"Reach",
"Student",
"Learn",
"Baseline",
"Ally",
"Milestone",
"Raise",
"Accreditation",
"Program Review",
"Portfolio",
"Outcomes",
"Engage-Campus-wide Elections",
"Engage-Co-Curricular Paths",
"Engage-ECIA",
"Engage-Rooms and Reservations",
"Learn-Bb Reporting",
"Learn-A4L",
]
"Academic Economics",
"Academy Use/Navigation",
"Accreditation",
"Ally",
"Anthology 101",
"Baseline",
"Beacon",
"Course Evaluations",
"Evaluate",
"CVue",
"Data Strategy",
"Digital Assistant",
"Encompass",
"Engage",
"Faculty Development",
"Finance & HCM",
"Insight",
"Learn",
"Milestone",
"Occupation Insight",
"Outcomes",
"Payroll",
"Planning",
"Portfolio",
"Power BI",
"Professional Development",
"Program Review",
"Radius",
"Raise",
"Reach",
"Student",
"Talisma",
]
url = "https://api.northpass.com/v2/bulk/groups"
headers = {
@ -33,10 +46,15 @@ headers = {
}
payload2 = []
for group in groups_to_create:
payload2.append({"name": group})
payload = {"data": {"attributes": {"groups": payload2}}}
t1 = f"{group} - (T1)"
t2 = f"{group} - (T2)"
t3 = f"{group} - (T3)"
# print(payload)
response = requests.post(url, json=payload, headers=headers)
print(response.text)
# print(response)
payload = {"data": {"attributes": {"groups":
[{"name": t1},
{"name": t2},
{"name": t3}]}}}
# print(payload)
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response)