The 22nd New York Volunteer Infantry served to defend the New York coast during the war. The unit never left New York state.
The Unit History:
The 22nd New York was formed after President McKinley's first call for troops was issued on April 23, 1898. The unit never left New York state during the war. The unit rendezvoused at Fort Slocum, New York where it also spent the majority of its time. During late April and May, 1898, the U.S.'s coastline was considered to be the front line of the war. It was thought that Admiral Cervera's Spanish naval squadron, which was known to be loose in the Atlantic, could attack some of the U.S. coastal cities. The fear turned to relief when Cervera's squadron was located and blockaded in the harbor at Santiago, Cuba. The squadron was subsequently destroyed at the Naval Battle of Santiago. The fighting ended with the August 13 armistice, though the war did not officially end until December 10, 1898 with the signing of the Treaty of Paris.
Once the Spanish squadron was located, the need for coastal defense
decreased, and units such as the 22nd New York could be disbanded before
the war actually ended.
Clerk of Joint Comittee on Printing, The Abridgement of Message
from the President of the United States to the Two Houses of Congress,
(Washington: Government Printing Office, 1899). Vol. 3, pp. 196, 493, 494.