A case study of the response of the magnetosphere to changes in the interplanetary medium