Re: Did I get a good deal on this diamondback apex?
The Diamond back Apex was a nice bike in it's day. The True temper TT frame tubing is good quality Cro-moly butted tubing. The Shimano STX components are serviceable and should work well. $175 is probably typical for a used bike in very good shape of its age and level.
If you ride the bike and take it for what it is (a 14 yo bike), and not try to compare it to a brand new mountain bike it should serve you well.
You mentioned that the chain and gears were a bit rusty, that leads me to think that the bike has been kept out in the weather some. I would at least replace the chain and think about having the hubs, and headset bearings repacked with grease. The bottom bracket(Crankset Bearings) are probably a cartridge unit which are usually well sealed; if it spins smoothly the grease may still be ok in it.
You will probably want to pull the brake and derailleur cable housings out of the split cable housing stops on the frame. then slide the housings up or down the cables a bit and lube the cables along the area where they ride inside the housing, as there may be some rust on the cables there. You can use a light coat of white lithium grease for this or something like TriFlow or Break Free CLP.
Lastly If the tires are original, its probably a good idea to put fresh rubber on it too. That way you can also select tires that match your personal riding style/terrain.
New tires are much more reliable than ones a decade and a half old, especially if the bike has been stored out in the weather.