Cardiff manager Ole Gunnar Solskjaer remained confident his new side would stay up despite seeing them lose his first Premier League game in charge.
He began his reign last week with an FA Cup win at Newcastle, but saw his side on Saturday.
The loss saw Cardiff drop into the relegation zone, leap-frogged by the Hammers on goal difference.
"I was surprised by the bad start we had... we never got going first half," said Solskjaer.
"The energy and the enthusiasm that we've seen - and we saw second half - wasn't there.
"We had about double the possession of them, we had twice the shots. So sometimes football is that way, that you don't get what you deserve.
"We had a couple of decent shots and their keeper [Adrian] did well but... they don't really count when you don't score."
West Ham led just before half-time when Carlton Cole got in front of marker Kevin Theophile-Catherine to convert Matt Jarvis' cross, with Mark Noble adding a late decisive second goal as Cardiff were caught chasing the game.
"The first goal was not very good defending, we're not aggressive enough, we don't get up to the ball, we switch off so he just runs blind-side of us - Carlton Cole should never be allowed that free run," Solskjaer said.
"We had to respond today as well as we did last week [against Newcastle], and we responded but we never had that little bit of good fortune that we might have deserved.
"We'll work at it. I know this is not going to be all singing and dancing of course, I expected it to be a tough job but we'll look forward to going to Manchester City next weekend.
"We're five points off 10th place. There's two leagues: it's so tight from 10 and down so we'll be competitive in that league, don't worry."
Solskjaer was able to give a debut to new signing Magnus Wolff Eikrem, who came off the bench to replace Gary Medel.
The manager was able to unveil his second recruit, - like Eikrem a Norway international midfielder - after the match.