Sync roster weeks from MySQL to API callers

Recipe ToolsDatabaseMarketing

What it does

When someone calls the Get fe_lib_roster_weeks endpoint, this automation queries the fe_lib_roster_weeks table in MySQL. The roster data is returned to the caller, or an error response is sent if the query fails.

Who it's for

Operations teams who need real-time access to roster week data without opening MySQL.

How teams use this

Retrieve current roster assignments

Pull the latest roster week data from MySQL to display schedules in a dashboard or report. The endpoint returns results immediately so teams see up-to-date information.

Integrate roster data into scheduling tools

Call this endpoint from a scheduling application to sync roster weeks into that system. The same query runs each time a sync is needed without manual intervention.

Add filtering by date range

Extend the endpoint to accept start and end date parameters so only roster weeks within that range are returned. This requires adding filter conditions to the MySQL query.

Expose roster data to external systems

Set up the endpoint so partner scheduling systems can call it to fetch roster weeks. The same MySQL query serves multiple callers without changes to the underlying data.

How it works

  1. Receive the roster weeks request. A call to the Get fe_lib_roster_weeks endpoint starts this automation in real-time so the caller waits for the response.
  2. Query the roster weeks table. Select all rows from the fe_lib_roster_weeks table in MySQL to retrieve the current roster week assignments and schedules.
  3. Return the roster data. Send the roster weeks data back to the caller. If an error occurs during the MySQL query, return the error response without retry.