This would be for marketers and CRM administrators. The goal is to consolidate information and use it in a format that is convenient and easy to load, even offline. Originally posted here: https://community.hubspot.com/t5/Share-Your-Work/Example-API-Call-for-Engagements/m-p/391850#M610 It would have been nice if Engagements like notes and email logs would be exportable from Hubspot. In lieu of waiting for them to make our own data easily accessible, I wanted to share this example API call for Engagements since I couldn't find one on HubSpot forums. You'll want to be sure you have Python 3.9 (released Dec 7 2020) and "pip requests" as found here: https://pypi.org/project/requests/ I have a line of code added to print it to JSON format for my own ease of use. import requests
response = requests.get("https://api.hubapi.com/engagements/v1/engagements/paged?hapikey=YOURAPIKEYHERE&limit=250&offSet=2")
print(response.json())
import json
def jprint(obj):
# create a formatted string of the Python JSON object
text = json.dumps(obj, sort_keys=True, indent=4)
print(text)
jprint(response.json())
... Afficher plus