Related Product
Which product is this feature related to?
Services
Is your feature request related to a problem? Please describe.
Finally getting around to creating this issue as directed a few months ago here.
Primary problem: retrieving every date of service for every person in any service schedule requires thousands of API requests.
We want understand "who is regularly serving". We have a sync process that runs for many data points, and the service schedule portion is by far the slowest. Today, this requires an API request per person, which can easily be in the thousands and make our sync take hours.
Today, our approach is:
- Page through
services/v2/teams?include=people in its entirety, every time, and collect all the person_ids from it.
- Page through
services/v2/people/<person_id>/schedules?include=plan_times&filter=after&after=<last_sync_time> for every person_id from the v2/teams response
Describe the solution you'd like
We would love to have an endpoint to retrieve all the service schedules for all people, particularly ordered by last update date (descending) so we can page through the API until we reach the date since our last synchronization. Maybe services/v2/schedules?include=plan_times? We're open to suggestions.
Our current implementation uses the following data points from services/v2/people/<person_id>/schedules
schedule.attributes.service_type_name
schedule.attributes.status
schedule.relationships.team.data.id
schedule.relationships.plan_times[*].attributes.starts_at
All from https://developer.planning.center/docs/#/apps/services/2018-11-01/vertices/schedule
Additional context
We also want to track team assignments, so we'll continue to use services/v2/teams?include=people for that regardless.
We always track the last time our api batches run, so ordering by an updated_at, descending is sufficient for us to know what has changed. We stop paging through the API when we reach updated_at values before the time of our last sync.
We're not currently in a position to set up a webhooks consumer for services changes, but that may work in the future. However, I don't think the currently available subscriptions include the data we're looking for.
Overall, we're just looking to reduce our API footprint to make things faster because we know we're causing a lot of load.
I have..
Related Product
Which product is this feature related to?
Services
Is your feature request related to a problem? Please describe.
Finally getting around to creating this issue as directed a few months ago here.
Primary problem: retrieving every date of service for every person in any service schedule requires thousands of API requests.
We want understand "who is regularly serving". We have a sync process that runs for many data points, and the service schedule portion is by far the slowest. Today, this requires an API request per person, which can easily be in the thousands and make our sync take hours.
Today, our approach is:
services/v2/teams?include=peoplein its entirety, every time, and collect all the person_ids from it.services/v2/people/<person_id>/schedules?include=plan_times&filter=after&after=<last_sync_time>for everyperson_idfrom thev2/teamsresponseDescribe the solution you'd like
We would love to have an endpoint to retrieve all the service schedules for all people, particularly ordered by last update date (descending) so we can page through the API until we reach the date since our last synchronization. Maybe
services/v2/schedules?include=plan_times? We're open to suggestions.Our current implementation uses the following data points from
services/v2/people/<person_id>/schedulesschedule.attributes.service_type_nameschedule.attributes.statusschedule.relationships.team.data.idschedule.relationships.plan_times[*].attributes.starts_atAll from https://developer.planning.center/docs/#/apps/services/2018-11-01/vertices/schedule
Additional context
We also want to track team assignments, so we'll continue to use
services/v2/teams?include=peoplefor that regardless.We always track the last time our api batches run, so ordering by an
updated_at, descending is sufficient for us to know what has changed. We stop paging through the API when we reachupdated_atvalues before the time of our last sync.We're not currently in a position to set up a webhooks consumer for services changes, but that may work in the future. However, I don't think the currently available subscriptions include the data we're looking for.
Overall, we're just looking to reduce our API footprint to make things faster because we know we're causing a lot of load.
I have..