Updated Skuid Tests, added Notes and Todos
This commit is contained in:
@ -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)
|
||||
|
||||
BIN
Scripts/Skuid_LPs/DE_names_emails.numbers
Normal file
BIN
Scripts/Skuid_LPs/DE_names_emails.numbers
Normal file
Binary file not shown.
BIN
Scripts/Skuid_LPs/DE_names_emails.xlsx
Normal file
BIN
Scripts/Skuid_LPs/DE_names_emails.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user