Updated Skuid Tests, added Notes and Todos

This commit is contained in:
Norm Rasmussen
2022-11-29 19:40:47 -05:00
parent 54b2817095
commit 8a9d86ff2d
11 changed files with 140 additions and 12 deletions

View File

@ -1,4 +1,5 @@
import requests
import json
apiKey = "L93lGMSugtpmsBhSAkx3tei6B"
@ -14,14 +15,16 @@ def getallUuid(apiKey):
}
response = requests.get(url, headers=headers)
jsonResponse = response.json()
next = jsonResponse["links"]
for id in jsonResponse["data"]:
user = id["id"]
uuid.append(user)
if jsonResponse["links"]["next"] == "":
if "next" not in next:
break
print(uuid)
addtoGroup(apiKey, uuid)
def addtoGroup(apiKey, uuid):
for x in uuid:
@ -29,7 +32,7 @@ def addtoGroup(apiKey, uuid):
payload = {"data": [
{
"type": "membership-groups",
"id": "GROUP ID"
"id": "2f9aaac9-000a-4888-be33-3b65b76b5b9f"
}]}
headers = {
"accept": "application/json",
@ -37,8 +40,8 @@ def addtoGroup(apiKey, uuid):
"X-Api-Key": apiKey
}
response = requests.post(url, json=payload, headers=headers)
jsonResponse = response.json()
print(jsonResponse)
#jsonResponse = response.json()
print(response)
if __name__ == "__main__":
getallUuid(apiKey)

Binary file not shown.

Binary file not shown.