bcquality/microsoft/knowledge/web-services/set-required-api-page-properties.md
Jesper Schulz-Wedde 2b5550c346
Some checks failed
Validate knowledge index / validate-index (push) Has been cancelled
Validate AL review fixtures / validate-review-fixtures (push) Has been cancelled
Validate frontmatter and structure / validate (push) Has been cancelled
Improve partner onboarding and documentation navigation (#174)
Lead with a complete plugin quick start and add task-oriented usage, troubleshooting, customization, and contribution guides. Preserve the broader plugin framing, correct conflicting contract guidance, support Agents folder reviews, and align repository validation. Convert existing sample references to clickable links without changing knowledge rules.

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-09 17:31:03 +02:00

1.7 KiB

bc-version domain keywords technologies countries application-area
all
web-services
api-page
pagetype-api
apipublisher
apigroup
apiversion
entityname
entitysetname
sourcetable
al
w1
all

Declare API routing properties and an explicit stable version

Description

An API page needs APIPublisher, APIGroup, EntityName, EntitySetName, and a backing SourceTable to define its routed entity. APIVersion is different: it is optional at the language level and defaults to beta. Omitting it therefore does not mean the page has no version; it publishes under the preview contract. A production integration that intends a stable route should set a vX.Y version explicitly rather than rely on that default.

Best Practice

Declare the five routing/entity properties required by the API page and set APIVersion explicitly for a stable published contract, for example 'v1.0'. Expose the record's fields inside a repeater under area(content). Review missing routing metadata as a malformed API definition, but review a missing APIVersion as unintended publication under beta, not as an unpublished endpoint.

See sample: set-required-api-page-properties.good.al.

Anti Pattern

Leaving out APIPublisher, APIGroup, EntityName, EntitySetName, or SourceTable leaves the API definition incomplete. A subtler contract defect is declaring all of those but omitting APIVersion: the page is exposed as beta, which is valid runtime behavior but not the explicit stable route a production client expects.

See sample: set-required-api-page-properties.bad.al.