Files
Gainsight/Scripts/API_Tests/list_prop_test.py

34 lines
818 B
Python

import requests
import Apikeys
APIKEY = Apikeys.walmartprod
def list_prop():
"""
Quick little function to output Course Properties to terminal
"""
url = "http://api2.northpass.com/v2/properties/courses/properties"
headers = {
"X-Api-Key": APIKEY,
"accept": "application/json",
}
# payload = {
# "data": [
# {
# "attributes": {"properties": {"sample_list": "item 3"}},
# "id": "0b31c435-c18b-4573-984e-32cda57045b4",
# "type": "person_properties",
# }
# ]
# }
# response = requests.post(url, headers=headers, json=payload)
response = requests.get(url, headers=headers)
print(response.text)
print(response.status_code)
if __name__ == "__main__":
list_prop()