See - A petition for certiorari may be invoked only against a tribunal, board, or officer exercising judicial or quasi-judicial functions. - The Lawyer's Post.
"x x x.
“First, the respondents neither acted in any judicial or quasi-judicial capacity nor arrogated unto themselves any judicial or quasi-judicial prerogatives. A petition for certiorari under Rule 65 of the 1997 Rules of Civil Procedure is a special civil action that may be invoked only against a tribunal, board, or officer exercising judicial or quasi-judicial functions.
Section 1, Rule 65 of the 1997 Rules of Civil Procedure provides:
SECTION 1. Petition for certiorari. — When any tribunal, board or officer exercising judicial or quasi-judicial functions has acted without or in excess of its or his jurisdiction, or with grave abuse of discretion amounting to lack or excess of jurisdiction, and there is no appeal, or any plain, speedy, and adequate remedy in the ordinary course of law, a person aggrieved thereby may file a verified petition in the proper court, alleging the facts with certainty and praying that judgment be rendered annulling or modifying the proceedings of such tribunal, board or officer, and granting such incidental reliefs as law and justice may require.
Elsewise stated, for a writ of certiorari to issue, the following requisites must concur: (1) it must be directed against a tribunal, board, or officer exercising judicial or quasi-judicial functions; (2) the tribunal, board, or officer must have acted without or in excess of jurisdiction or with grave abuse of discretion amounting [to] lack or excess of jurisdiction; and (3) there is no appeal or any plain, speedy, and adequate remedy in the ordinary course of law.
A respondent is said to be exercising judicial function where he has the power to determine what the law is and what the legal rights of the parties are, and then undertakes to determine these questions and adjudicate upon the rights of the parties.
Quasi-judicial function, on the other hand, is “a term which applies to the actions, discretion, etc., of public administrative officers or bodies … required to investigate facts or ascertain the existence of facts, hold hearings, and draw conclusions from them as a basis for their official action and to exercise discretion of a judicial nature.”
Before a tribunal, board, or officer may exercise judicial or quasi-judicial acts, it is necessary that there be a law that gives rise to some specific rights of persons or property under which adverse claims to such rights are made, and the controversy ensuing therefrom is brought before a tribunal, board, or officer clothed with power and authority to determine the law and adjudicate the respective rights of the contending parties.
The respondents do not fall within the ambit of tribunal, board, or officer exercising judicial or quasi-judicial functions. As correctly pointed out by the respondents, the enactment by the City Council of Manila of the assailed ordinance and the issuance by respondent Mayor of the questioned executive order were done in the exercise of legislative and executive functions, respectively, and not of judicial or quasi-judicial functions. On this score alone, certiorari will not lie.
x x x."