08-29-2022 07:25 AM - edited 08-29-2022 08:35 AM
Created an API to pull meeting data from Webex by specific date, but the API is pulling meetings from outside the date range. Also, it's not pulling all meetings. Anyone got any tips to improve code?
import http.client
import pandas as pd
import json
import csv
conn = http.client.HTTPSConnection("webexapis.com")
payload = ''
headers = {
'Authorization': 'Bearer ************************************'
}
conn.request("GET", "/v1//meetings?meetingType=meetingSeries&from=2022-08-22&to=2023-08-23", payload, headers)
res = conn.getresponse()
data = res.read()
df2 = data
df = pd.read_json(data)
scheduled_meeting_data = df['items']
data_file = open('scheduledMeeting_data.csv', 'w')
csv_writer = csv.writer(data_file)
count = 0
for f in scheduled_meeting_data:
if count == 0:
header = f.keys()
csv_writer.writerow(header)
count +=1
csv_writer.writerow(f.values())
data_file.close()
08-30-2022 07:05 AM
If you're wanting meetings that have already happened with a specific date range then you would use meetingType=meeting. That will pull any ended or inProgress meetings. Using meetingSeries will pull the scheduling details for meetings and not the actual session details.
08-30-2022 07:05 AM
@WEBEXAPINEWBIE can you please test the same outside your code, on the Dev portal for example: https://developer.webex.com/docs/api/v1/meetings/list-meetings ? Do you get the same result? If you can reproduce it that way, feel free to open a ticket with our team - email to devsupport@webex.com .
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide