
31 S.W.3d 750 (2000)
TEXAS STATE BOARD OF PLUMBING EXAMINERS, Appellant,
v.
ASSOCIATED PLUMBING-HEATING-COOLING CONTRACTORS OF TEXAS, INC., Appellee.
No. 03-00-00328-CV.
Court of Appeals of Texas, Austin.
October 26, 2000.
*751 Kurt H. Kuhn, Office of the Solicitor General, Austin, for Appellant.
Hector Deleon, Deleon, Boggins & Icenogle, P.C., Austin, for Appellee.
Before Justices JONES, KIDD and YEAKEL.
KIDD, Justice.
Associated Plumbing Heating Cooling Contractors of Texas, Inc. sued the Texas State Board of Plumbing Examiners. Following a non-jury trial, the district court rendered judgment in favor of Associated Plumbing. On appeal, the Board complains about only one aspect of the judgmentthat the Board pay Associated *752 Plumbing's attorney's fees. The Board contends that attorney's fees are not recoverable as a matter of law because the underlying proceeding was substantively only an administrative rule challenge governed exclusively by the Administrative Procedure Act (APA), which does not provide for recovery of attorney's fees. We will affirm the district court's judgment.

Background
Associated Plumbing is a non-profit Texas association that has been approved by the Board as a provider for mandatory continuing professional education (MCPE) for licensed plumbers in the state. On September 13, 1999, acting pursuant to provisions in the Plumbing License Law,[1] the Board adopted a revision to its rule regarding MCPE to be effective October 5, 1999. The revision provided that the Board would be the sole provider of the textbook for MCPE in Texas. See 22 Tex.Admin.Code § 365.14 (2000). Additionally, the revision prohibited any entity other than the Board from developing, producing, or distributing the MCPE textbook. Id. Finally, the revision would allow the Board to enter into an interagency contract with another state agency to develop, produce, and distribute the MCPE textbook. Id. At the same meeting, the Board voted to enter into an interagency contract with the Texas Engineering Extension Service, a division of Texas A & M University, to act as the sole provider to develop, produce, and distribute the MCPE textbook. The Board approved the Engineering Extension Service as a provider of MCPE materials and on November 11, the Board and the Engineering Extension Service executed their interagency contract.
Associated Plumbing commenced the underlying proceeding pursuant to provisions in the Texas Constitution, the APA and the Uniform Declaratory Judgments Act (UDJA). See Tex. Const. art. 5, § 8; Tex.Gov't Code Ann. § 2001.038 (West 2000); Tex.Civ.Prac. & Rem.Code Ann. § 37.004 (West 1997). In the proceeding, Associated Plumbing: (1) asked the district court to construe the statute governing the Board and resolve conflicts, if any, between sections 5(d) and 12B[2]; (2) challenged the revision to the Board's rules at section 365.14, sought to have the revision declared invalid, and asked the court to enjoin its promulgation; (3) asked the district court to declare the interagency contract executed by the Board and the Engineering Extension Service void; and (4) asked the district court to enjoin the Engineering Extension Service from serving as a provider for the MCPE programs for licensed plumbers. Additionally, Associated Plumbing sought recovery of its attorney's fees from the Board pursuant to the UDJA. See Tex.Civ.Prac. & Rem.Code Ann. § 37.009 (West 1997).
In the judgment, the district court made several declarations: (1) no conflicts exist between sections 5(d) and 12B of article 6243-101; (2) the MCPE program must be provided by an individual, business, or association approved by the Board; (3) the Board was without statutory authority to adopt the revision; (4) the revision was invalid; (5) the Engineering Extension Service was not a proper entity to serve as a MCPE provider under section 12B of article 6243-101; and (6) the Engineering Extension Service may not serve as a provider for the MCPE programs for licensed plumbers. Additionally, the district court enjoined the Board from: (1) instituting the revision; (2) implementing the interagency agreement with the Engineering Extension Service that would grant it the exclusive right to develop, publish, and distribute material for the MCPE program; and (3) prohibiting Associated Plumbing from developing, publishing, and *753 distributing materials conforming to the criteria to be adopted by the Board for the MCPE program for plumbers. Finally, the district court ordered the Board to pay Associated Plumbing's attorney's fees.

Discussion
The Board appeals only the award of attorney's fees and contends that the entire proceeding was governed by the APA; therefore, it argues attorney's fees were not recoverable as a matter of law. The Board argues that Associated Plumbing included a claim under the UDJA only to recover attorney's fees and that Associated Plumbing was not "entitled to attach a redundant declaratory judgment action" solely to recover attorney's fees. The Board argues that the substantive issue in the proceeding was a challenge to the validity of an administrative rule, and as a matter of law, the district court abused its discretion by ordering the Board to pay Associated Plumbing's attorney's fees.
Associated Plumbing does not dispute the fact that attorney's fees are not recoverable in an APA declaratory judgment action. See Tex.Gov't Code Ann. § 2001.038. Associated Plumbing's response to the Board's argument is that the proceeding involved more than simply a rule challenge regarding the Board's revision to section 365.14. Associated Plumbing contends that in addition to determining the validity of the rule, it also sought a declaration under the UDJA that the Board had no authority to designate the Engineering Extension Service as the exclusive developer for MCPE materials and, further, the Board's contract with the Engineering Extension System was invalid.
Attorney's fees are recoverable only when provided for by statute or by the parties' agreement. Dallas Cent. Appraisal Dist. v. Seven Inv. Co., 835 S.W.2d 75, 77 (Tex.1992). A party proceeding under the UDJA may recover its attorney's fees. Tex.Civ.Prac. & Rem .Code Ann. § 37.009. The grant or denial of attorney's fees under the UDJA is within the district court's discretion and its order will not be reversed on appeal absent a showing that the court abused its discretion. Oake v. Collin County, 692 S.W.2d 454, 455 (Tex. 1985); Del Valle Indep. Sch. Dist. v. Lopez, 863 S.W.2d 507, 513 (Tex.App.-Austin 1993, writ denied). The legal principle encompassed in the term "abuse of discretion" concerns a legal error committed by the district court in its award of attorney's fees that injured or prejudiced appellants. Lopez, 863 S.W.2d at 513. A question of legal error is reviewed de novo. State v. Heal, 917 S.W.2d 6, 9 (Tex.1996); Mayberry v. Texas Dep't of Agric., 948 S.W.2d 312, 314 (Tex.App.-Austin 1997, pet. denied).
When a plaintiff files a proceeding that only challenges the validity of an administrative rule, the parties are bound by the APA and may not seek relief under the UDJA because such relief would be redundant. Texas Educ. Agency v. Leeper, 893 S.W.2d 432, 443-44 (Tex.1994) (plaintiff not only challenging administrative order, therefore, proceeding not governed solely by APA); Young Chevrolet, Inc. v. Texas Motor Vehicle Bd., 974 S.W.2d 906, 911 (Tex.App.-Austin 1998, pet. denied). This proposition is consistent with appellate-court holdings that have concluded it is an abuse of discretion to award attorney's fees under the UDJA when the relief sought is no greater than relief that otherwise exists by agreement or statute. See Boatman v. Lites, 970 S.W.2d 41, 43 (Tex.App.-Tyler 1998, no pet.); University of Texas v. Ables, 914 S.W.2d 712, 717 (Tex.App.-Austin 1996, no writ). It is an abuse of discretion, therefore, to award attorney's fees under the UDJA when the statute is relied upon solely as a vehicle to recover attorney's fees. Southwest Guar. Trust Co. v. Hardy Road 13.4 Joint Venture, 981 S.W.2d 951, 956 (Tex.App.-Houston [1st Dist.] 1998, pet. denied); Whiteside v. Griffis & Griffis, P.C., 902 S.W.2d 739, 747 (Tex.App.-Austin 1995, writ denied).
*754 We agree with the Board that the district court's construction of sections 5(d) and 12B of article 6243-101 was central to determining the validity of the revision under the APA. See Texas Alcoholic Beverage Comm'n v. Amusement & Music Operators of Tex., Inc., 997 S.W.2d 651, 658 (Tex.App.-Austin 1999 pet. dism'd w.o.j.). The district court, however, not only construed the statute to determine that there were no conflicts and that the rule was invalid, but also construed the statute to determine and declare the contract between the Board and the Engineering Extension Service void. Further, the district court enjoined the Engineering Extension Service from serving as a provider of materials for MCPE programs. We hold that these acts went beyond merely challenging an administrative rule. Because the proceeding was not solely a challenge to the Board's revision of its rules, we hold that the district court did not abuse its discretion in ordering the Board to pay Associated Plumbing's attorney's fees.
The Board's issue is overruled and the district court's judgment is affirmed.
NOTES
[1]  See Tex.Rev.Civ.Stat.Ann. art. 6243-101 §§ 5(d), 12B (West Supp.2000).
[2]  These sections address voluntary and mandatory continuing education programs for plumbers and also delineate the Board's powers regarding these programs.
