Files
Gainsight/Scripts/API_Tests/list_prop_test.py

34 lines
818 B
Python
Raw Permalink Normal View History

2023-06-21 16:58:47 -04:00
import requests
import Apikeys
2023-06-21 16:58:47 -04:00
APIKEY = Apikeys.walmartprod
2023-06-21 16:58:47 -04:00
def list_prop():
"""
Quick little function to output Course Properties to terminal
"""
url = "http://api2.northpass.com/v2/properties/courses/properties"
2023-06-21 16:58:47 -04:00
headers = {
"X-Api-Key": APIKEY,
2023-06-21 16:58:47 -04:00
"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)
2023-06-21 16:58:47 -04:00
print(response.text)
print(response.status_code)
if __name__ == "__main__":
list_prop()