
366 N.W.2d 515 (1985)
TELECONNECT COMPANY, Appellant,
v.
IOWA STATE COMMERCE COMMISSION, Appellee.
No. 84-724.
Supreme Court of Iowa.
April 17, 1985.
*516 Thomas Collins, Richard C. Garberson, Joan Lipsky, and Kevin H. Collins of Shuttleworth & Ingersoll, P.C., Cedar Rapids, for appellant.
Philip E. Stoffregen, Gen. Counsel, Patrick J. Nugent, Deputy Counsel, and David J. Lynch, Asst. Gen. Counsel, Des Moines, for appellee.
Considered en banc.
LARSON, Justice.
Teleconnect Company appeals from a district court order dismissing its petition for judicial review and lifting a stay order previously granted. It claims the court erred in depriving Teleconnect of notice and hearing prior to the dismissal, because it acted without authority and denied it procedural due process. The appellee Iowa State Commerce Commission cross-appealed, claiming Teleconnect's failure to serve a copy of its petition for judicial review on the Office of the Consumer Advocate, Iowa Code section 475A.5 (1983 Supp.), deprived the district court of jurisdiction. The commission also argues on cross-appeal that the district court should have considered the commission's action dismissing Teleconnect's petition for declaratory ruling as a contested case proceeding for all purposes, not merely for the purpose of determining whether the agency action was final. We affirm on both appeals.
The controversy in this case centers around Iowa Code section 476.1, as amended by 1983 Iowa Acts chapter 127, section 15, now appearing as Iowa Code section 476.1 (1985). This section limits the jurisdiction of the commerce commission with respect to long distance communication services as follows:
The jurisdiction of the commission as to the regulations of communications services is not applicable to a service or facility provided by a telephone utility that is or becomes subject to competition, as determined by the commission. In determining whether a service or facility is or becomes subject to competition, the commission shall consider whether a comparable service or facility is available from a supplier other than the telephone *517 utility. When a service or facility provided by a telephone utility becomes subject to competition, the commission shall, within a reasonable period of time, deregulate that service or facility. [Emphasis added.]
On February 16, 1984, Teleconnect filed, with the commerce commission, a petition for declaratory ruling, seeking a determination that it was not subject to regulation by the commission because it was "subject to competition" within the meaning of section 476.1, as amended. The petition offered to provide the commission with any additional evidence or information relevant to this issue.
The commission dismissed Teleconnect's petition on February 24, 1984, pursuant to Iowa Administrative Code section 2504.6(12). That section provides that the commission may dismiss when "[t]he petitioner requests a declaratory ruling which, though technically binding only upon the commission and the petitioner, would necessarily determine the legal rights of other persons who have not filed such a petition and whose position on the issue may fairly be presumed to be adverse to the petitioner, or who are unrepresented in the declaratory ruling proceeding." The commission noted that such entities as AT & T of the Midwest, Northwestern Bell, MCI, GTE Sprint, and other long distance providers would "clearly be affected by any determination affecting Teleconnect."
The order did, however, contemplate other commission proceedings to address this issue. Specifically, it suggested that orders would be filed requiring Teleconnect and other exchange carriers to either file tariffs or show cause why they should be exempt. Additionally, the commission indicated that it was considering the initiation of rule-making proceedings to determine what factors would be considered in deciding whether a facility was "subject to competition" under section 476.1.
Teleconnect filed a petition for judicial review on March 7, 1984, requesting that the district court determine the issue the commission had refused to consider, i.e., whether Teleconnect was "subject to competition" within the meaning of section 476.1. (The petition for judicial review was not served on the Office of Consumer Advocate, and this presents one of the cross-appeal issues.)
The following day, on March 8, 1984, the commission entered the order which it had alluded to in the February 24 order. It asserted that Teleconnect had not filed tariffs, as required by Iowa Code section 476.1, and required Teleconnect to either file tariffs or show cause why it should not be required to do so. The order further provided that, if the company chose not to comply, the commission would set a hearing to determine if civil penalties were justified. This order was later stayed by the district court.
On March 23, 1984, Teleconnect filed an amended petition. Division I asserted that the commission, although not directly, actually had decided the merits of the "competition" issue, adversely to Teleconnect, by ordering it to file tariffs, thus exercising jurisdiction over it. Division II alternatively urged that, if the district court should find that the issue had not been determined by the commission, it should order that the commission decide it.
Iowa Rule of Civil Procedure 333(b) provides a procedural schedule for contested case proceedings:
Upon request of any party the reviewing court shall, or upon its own motion may, establish a schedule for the conduct of the proceeding.
The commission filed a motion pursuant to that rule, apparently presuming it would be treated as a contested case proceeding, and asked that a schedule be established. Teleconnect, on the other hand, sought a pretrial conference for the purpose of establishing briefing deadlines, oral arguments, and an opportunity to present evidence, apparently assuming it would not be treated as a contested case proceeding. Further responses were filed by both sides on the issue of whether the case should be treated as a contested case and specifically whether *518 presentation of additional evidence would be permitted.
A pretrial hearing was held, which the court indicated was for the purpose of establishing ground rules and a procedural schedule. Although the subjects of dismissal and dissolution of the stay were not discussed at great length, the district court did conclude that it had to resolve the proper scope of its activity before considering any action urged by Teleconnect. Teleconnect's petition for judicial review was dismissed by order of the district court on April 15, 1984 without further notice or hearing. This appeal followed.
I. The "Sua Sponte" Dismissal of the Petition for Judicial Review.
Teleconnect maintains the district court erred in dismissing its petition for judicial review without notice of its intention to do so and without affording it a hearing and opportunity to resist. It also raises an issue of procedural due process in respect to that action.
Iowa Code section 17A.9 deals with agency declaratory rulings. It provides:
Each agency shall provide by rule for the filing and prompt disposition of petitions for declaratory rulings as to the applicability of any statutory provision, rule or other written statement of law or policy, decision or order of the agency. Rulings disposing of petitions have the same status as agency decisions or orders in contested cases.
The commerce commission has adopted rules governing declaratory rulings. See I.A.C. § 2504.1-.7. (There is no contention that Teleconnect did not comply with these rules in filing its petition for declaratory ruling with that agency.) The commission also has rules defining the conditions for dismissal of petitions for declaratory rulings. These rules, in pertinent part, state:
2504.6(17A,474) Dismissal. The commission may, in its discretion, dismiss the petition for any reason which it deems just and proper, including, but not limited to, the following:
....
12. The petitioner requests a declaratory ruling which, though technically binding only upon the commission and the petitioner, would necessarily determine the legal rights of other persons who have not filed such a petition and whose position on the issue may fairly be presumed to be adverse to the petitioner, or who are unrepresented in the declaratory ruling proceeding.
Citing subsection 12 of its rule, the commerce commission refused to issue a ruling in this case, pointing out that other long distance carriers, such as AT & T, MCI, and GTE Sprint, would be affected by any ruling made on behalf of Teleconnect.
Iowa Code section 17A.19 provides the exclusive means of judicial review of agency action. Public Employment Relations Board v. Stohr, 279 N.W.2d 286, 289 (Iowa 1979) (citing Richards v. Iowa State Commerce Commission, 270 N.W.2d 616, 619 (Iowa 1978) ). "`Agency action' includes a declaratory ruling or a refusal to issue such a ruling." See § 17A.2(9); Burlington Community School District v. Public Employment Relations Board, 268 N.W.2d 517, 521 (Iowa 1978). Cf. Schmitt v. Iowa Department of Social Services, 263 N.W.2d 739, 743 (Iowa 1978) (refusal to adopt rules requested by citizen was reviewable agency action). Because, in this case, the commission's refusal to issue a declaratory ruling was a final action, all administrative remedies were exhausted. See Iowa Code §§ 17A.15, .19(1). The commission's dismissal of Teleconnect's petition for a declaratory ruling was thus reviewable under the standards furnished by section 17A.19(8).
A district court, reviewing agency action, exercises only appellate jurisdiction. Campbell v. Iowa Beer and Liquor Control Department, 366 N.W.2d 574, 576 (Iowa 1985); Stohr, 279 N.W.2d at 290; Iowa Public Service Company v. Iowa State Commerce Commission, 263 N.W.2d 766, 768-69 (Iowa 1978). As we have previously noted, "[w]hen resolution of a controversy has been delegated to an administrative *519 agency, the district court has no original authority to declare the rights of parties or the applicability of any statute or rule." Stohr, 279 N.W.2d at 290. See also Bonfield, The Iowa Administrative Procedure Act: Background, Construction, Applicability, Public Access to Agency Law, The Rulemaking Process, 60 Iowa L.Rev. 731, 806 n. 271 (1975). The court's power to decide such issues is derived from and is completely dependent upon its authority to review agency actions. Stohr, 279 N.W.2d at 290.
The commission in this case stated in its order dismissing Teleconnect's petition that it was "considering initiating other proceedings" to address the competition issue. It was obviously of the opinion that a declaratory ruling was not the proper vehicle to make a determination of competition as set forth in Iowa Code section 476.1.
The general rule with regard to decisions of this type is that "the choice made between proceeding by general rule or by individual, ad hoc litigation is one that lies primarily in the informed discretion of the administrative agency." Bonfield, supra, at 925 (citing Security Exchange Commission v. Chenery Corp., 332 U.S. 194, 203, 67 S.Ct. 1575, 1580, 91 L.Ed. 1995, 2002 (1947)). This court has similarly held:
Absent statutory guidance, the choice of whether to develop policy by rule, contested case, or both, lies "[within] the informed decision of the administrative agency", S.E.C. v. Chenery Corp., 332 U.S. 194, 203, 67 S.Ct. 1575, 1580, 91 L.Ed. 1995, 2002 (1947). Either means may be used so long as the statutory procedure is complied with. See Bonfield, supra, at 924-927. Of course, a rule has the binding effect of law, whereas the decision of a contested case is but of precedential value.
Young Plumbing and Heating Co. v. Iowa Natural Resources Council, 276 N.W.2d 377, 382 (Iowa 1979). Hence, the commission's decision to dismiss appellant's petition for declaratory ruling was within its discretion. This action merely required Teleconnect, or other interested parties, to initiate proceedings other than those for a declaratory ruling. It did not amount to an implicit ruling on the merits as argued by Teleconnect.
Teleconnect strenuously objects to the summary procedure in the district court on judicial review of that ruling. It argues that it was denied notice of the court's intent to dismiss the case and that the dismissal was not in response to any motion filed by the commission, thereby catching Teleconnect by surprise.
We have noted the authority of a court to sua sponte dismiss a case, although we have emphasized the need to exercise this authority sparingly. See Motz v. Motz, 207 N.W.2d 580 (Iowa 1973) ("[O]ur rules and statutes do not expressly authorize trial courts on their own initiative, to dismiss actions such as this one, except for failure to prosecute."); Rush v. Sioux City, 240 N.W.2d 431, 439 (Iowa 1976) ("The more logical approach is to allow trial courts to exercise the power to sua sponte dismiss actions in a `restrained' manner.").
At the outset, however, it does not appear that the court's actions here were beyond the contemplation of the parties. This is apparent from the colloquy between the court and the lawyers at the time of the hearing on the commission's application for the procedural schedule under rule 333(b). At one point, this exchange took place:
THE COURT: No doubt but the issue at the moment appears to be what in the world are we supposed to do next. The issue at this pointthe first issue is not whether or not Teleconnect is subject to competition. The first issue is what do I do. Do I decide am I supposed to hold the trial or not hold a trial so I don't know how long it's going to take you to depose these people. How long will it take you to present if you want anything else on this issue, if I decide I'm not supposed to do what you want me to do, there is no point in having the schedule for doing the depositions.

MR. COLLINS: That's right.
....

*520 THE COURT: The first thing isthe first issue I have to resolve is what I'm supposed to do, then we can worry about whether or not if I decide I'm supposed to conduct a hearing like you wanted, then that's fine, we have a schedule to do that. It's not fine with you, I understand, but if I decide that they're [the commission] right, then I'm not sure what you want me to do with this, dismiss the whole thing or whatever, if I decide what you want to do is the right thing to do, then your depositions schedule doesn't mean anything.

MR. COLLINS: That's right except that we're here today. I don't think you need to say depose Varley on a certain day or submit on another day. I'm saying as long as we're here we could say if there is going to be a hearing, let's have it on a given day. We're all sitting here. We might as well shoot toward a date rather than having you decide which I don't mean to be presumptuous at all but when you have read the whole pleading in sequence of things here, then we wouldn't be back again to say now let's get together and decide when, so it would be only if you decide that you are going to have the hearing which I think will be the case we've got a date; and if you decide we don't, so what, why take another trip to do that. [Emphasis added.]
At another point, this colloquy occurred:
THE COURT: I understand. Okay. Now, it seems to me the first thing we have to do is to decide on the preliminary stuff. I'm not going to set any further hearing date or any discovery deadlines or anything else. How faris there anything else you want me to have before I decide the first issue which is what in the world I'm supposed to do next, is it all here?
MR. COLLINS: I think it's all here.
THE COURT: If I read this from cover to cover and understand all of it and read all the cases and decide what we're to do next, this is all I need?
MR. COLLINS: I believe so.
MR. NUGENT: Just the transcript.
From this colloquy, it appeared that the parties were at least aware that a dispositive ruling might be made on the basis of the arguments at the time of the scheduling hearing and the authorities cited to the court.
In addition, under the unique posture of this case, it was proper for the district court to dismiss the petition for judicial review without further notice and hearing because ultimately the court had no choice but to dismiss it. No additional hearing, presentation of evidence, legal arguments, or presentation of legal authorities could change that. This is so because, as the district court pointed out in its ruling, Division I could not be sustained; the commission had discretion to summarily dismiss the petition and did not in fact rule on the merits of the controversy as argued by Teleconnect. In connection with Division II, the court had no authority, in the event it determined the issue had not been resolved on the merits, to require the commission to do so. It is clear from a reading of the statutes and commission rules quoted above, that the means by which Teleconnect would be permitted to urge its jurisdiction argument were within the discretion of the commission. It was not required to do so by declaratory ruling but could, as it did in this case, require it to be done by some other means. The district court would be without authority to order otherwise.
We conclude the district court did not act improperly in dismissing the petition for judicial review. While it would, perhaps, have been more appropriate to provide Teleconnect with a clearer notice that immediate dismissal was an option being considered by the court, counsel for Teleconnect should have been aware from the comments made at the hearing that this could in fact happen. Moreover, as we have discussed, the court's hands were tied. At some point, either at the outset of the proceedings or later, the petition would have to have been resolved against Teleconnect.


*521 II. The Due Process Argument.

Teleconnect maintains the district court's "improvident" dismissal of the petition resulted in the denial of constitutionally protected property rights, citing Fuentes v. Shevin, 407 U.S. 67, 80, 92 S.Ct. 1983, 1994, 32 L.Ed.2d 556, 569-70 (1972) (parties whose rights are to be affected are entitled to notice and opportunity to be heard).
Pointing out that Iowa Administrative Code section 2504.4(2) precludes hearings before the commission on petitions for declaratory ruling, Teleconnect contends that the district court's dismissal denied it its "day in court." In a related issue, Teleconnect requested the case be remanded and the district court ordered to provide it a full evidentiary hearing.
As previously noted, a party often has the choice of seeking a declaratory ruling or resolving an issue through a alternate procedure. The problem with a declaratory ruling proceeding is that it does not have the "more extensive procedural rights" offered by other agency procedures. Bonfield, The Iowa Administrative Procedure Act: Background, Construction, Applicability, Public Access to Agency Law, The Rulemaking Process, 60 Iowa L.Rev. at 816. Under our decision in Stohr, Teleconnect knew or should have known when it filed its petition that it was requesting a limited administrative proceeding with limited appeal possibilities. In short, neither the commission nor the district court committed error when they declined to let Teleconnect conduct a "full evidentiary hearing." Teleconnect has been denied its full hearing only under the declaratory ruling procedure. Other, alternative, procedures have not been precluded.

III. The Cross-Appeal Issues.

The commission claims, in its cross-appeal, that Teleconnect's failure to serve notice of a petition for judicial review on the Office of Consumer Advocate deprived the district court of jurisdiction over this matter. (While this argument was not presented in the district court, we nevertheless address it on appeal, because it is a matter of appellate jurisdiction.)
The Commission bases its argument on a § 17A.19 (1983), § 475A.5 (Supp.1983), and § 475A.2 (Supp.1983). Section 17A.19(2) (1983), which contains the notice provisions of the Iowa Administrative Procedures Act, provides in part:
Within ten days after the filing of a petition for judicial review the petitioner shall serve by the means provided in the Iowa rules of civil procedure for the personal service of an original notice, or shall mail copies of the petition to all parties named in the petition and, if the petition involves review of agency action in a contested case, all parties of record in that case before the agency. Such personal service or mailing shall be jurisdictional.
While this section does not specifically require service upon the Office of Consumer Advocate, the commission points out that chapter 17A is meant to be a minimum procedural code. See § 17A.1(2). Under its argument, sections 475A.5 and 475A.2 augment the notice provisions contained in the administrative procedure act.
Section 475A.5 (1983 Supp.) provides:
Service. The consumer advocate is entitled to service of all documents required by statute or rule to be served on parties in proceedings before the Iowa state commerce commission and all notices, petitions, applications, complaints, answers, motions, and other pleadings filed pursuant to statute or rule with the commerce commission.
The effect of a failure to serve a copy on the Office of Consumer Advocate is significant in light of the statutory duty provision contained in section 475A.2. It provides:
Duties. The consumer advocate shall:
1. Investigate the legality of all rates, charges, rules, regulations, and practices of all persons under the jurisdiction of the Iowa state commerce commission, and institute civil proceedings before the commission or any court to correct any illegality on the part of any such person.

*522 In any such investigation, the person acting for the office of the consumer advocate shall have the power to ask the commission to issue subpoenas, compel the attendance and testimony of witnesses, and the production of papers, books, and documents, at the discretion of the commission.
2. Act as attorney for and represent all consumers generally and the public generally in all proceedings before the Iowa state commerce commission.
3. Institute as a party judicial review of any decision of the Iowa state commerce commission, if the consumer advocate deems judicial review to be in the public interest.
4. Appear for all consumers generally and the public generally in all actions instituted in any state or federal court which involve the validity of a rule, regulation, or order of the Iowa state commerce commission.
5. Act as attorney for and represent all consumers generally and the public generally in proceedings before federal and state agencies and related judicial review proceedings and appeals, at the discretion of the consumer advocate.
6. Appear and participate as a party in the name of the office of consumer advocate in the performance of the duties of the office.
In light of the advocate's duty to act as attorney for and represent all consumers generally in the agency proceedings and related judicial review proceedings, it is important that notice be served on it. Without notice, the office is precluded from performing its statutory duties. We do not believe, however, that the Office of Consumer Advocate is a "party" under section 17A.19(2), so as to make service of notice upon it a matter of jurisdiction.
Under our disposition of this case, it is unnecessary for us to address the second cross-appeal issue, whether the district court erred in failing to conclude the declaratory ruling had the same status as a contested case appeal.
The case is affirmed on both appeals. Costs are taxed to Teleconnect.
AFFIRMED.
All Justices concur except REYNOLDSON, C.J., and McCORMICK, SCHULTZ, and CARTER, JJ., who take no part.
