Malky Mackay said: "There are no easy games in this division and everyone can beat everyone - we are disappointed to lose.
"On another day Heidar (Helguson) could have scored five. We had 20 attempts on goal, did everything but score and weren't clinical. That wasn't good enough.
"We were beaten and can play much better. We want to be as consistent as possible and the league table shows that, but we have to work hard every week.
"We were bound to lose at home at some point, but full credit to Peterborough. They deserved the win.
"Darren Ferguson always has a good football team and if they keep playing like that they won't have an issue this season."
Peterborough also ended Hull's 100 per cent streak at the KC Stadium in September with a 3-1 win, but this victory in the Welsh capital ranks as the biggest surprise of the Championship season.
It was Posh's first success since October 27 - but it could have been more had striker Gayle been able to convert numerous second-half chances.
Proud Peterborough boss Ferguson said: "We have beaten the best team in the league and also won at Hull so that shows we can beat any team in this league.
"It's a very good day. But we haven't been consistent enough this season.
"I have always believed in the players and maintained the confidence that we can get the job done - but we need to produce consistent performances.
"We played very well but we did so last week. The difference was we defended well too.
"We stuck to the game plan and deserved the win but we didn't finish them off. We were hanging on a bit at the end.
"But if we continue to perform like that we will be fine in this league."
Although, the visitors held the upper hand in the early exchanges, Ferguson's men were handed a slice of fortune for the opening goal on 22 minutes.
Referee David Coote awarded Peterborough a free-kick 25 yards from goal when it appeared Heidar Helguson had been fouled by Gabriel Zakuani.
That decision angered Mackay, who ranted at the fourth official - but worse was to follow as Lee Tomlin's lay-off allowed Bostwick to smash the ball past Marshall.
Cardiff's home faithful chanted, '1-0 to the referee', but, in truth, Peterborough were deserving of the advantage.
Mackay said: "I thought it was an incredible decision. Heidar kicks the ball and their player comes in five seconds late. It shouldn't have been a free-kick and should have been a booking for their player."
Ferguson responded: "If we did (get a bit of good luck) then we deserved it. The strike was fantastic and there was no way the keeper was going to save it."