Skip to content

Add /migrate-webapi-selectall skill to replace deprecated Web API wildcard field settings - #484

Draft
Ramachandran R (r-ramachandran) wants to merge 1 commit into
mainfrom
users/ramacr/migrate-webapi-selectall-skill
Draft

Add /migrate-webapi-selectall skill to replace deprecated Web API wildcard field settings#484
Ramachandran R (r-ramachandran) wants to merge 1 commit into
mainfrom
users/ramacr/migrate-webapi-selectall-skill

Conversation

@r-ramachandran

@r-ramachandran Ramachandran R (r-ramachandran) commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Why

Power Pages is deprecating the wildcard (*) value for Webapi/<table>/fields site settings. A wildcard exposes every column of a table through the Web API — including columns the site never reads — and those sites will break when the wildcard is retired. Migrating by hand means reading every Web API call and every response consumer to work out which columns are actually required, which is impractical on a real site.

What this adds

A new user-invocable skill, /power-pages:migrate-webapi-selectall, that replaces each wildcard with the smallest explicit column list the site's own code proves it needs.

  • Inventories every Webapi/<table>/fields setting across all configuration scopes and deployment profiles, classifying each as wildcard, explicit, missing, or duplicate.
  • Traces each Web API call through its wrappers, query/body builders, response mappers, and consumers, then resolves the entity set to its logical table via Dataverse metadata — never by pluralizing a name.
  • Derives columns from $select, $filter, $orderby, $apply, FetchXML, write payloads, @odata.bind lookups, and file/image routes. The response projection and the fields allowlist stay separate, so a filter-only column is never added to $select.
  • Proposes an exact replacement for every wildcard, adds a $select where a read previously relied on implicit selection, and reviews already-explicit settings for missing or unnecessary columns.

Both site types are covered: traditional HTML/JavaScript/Liquid sites and React, Vue, Angular, or Astro code sites. Only authored source is analyzed — compiled bundles, content-hashed assets, source maps, and build output are excluded. If a call exists only in generated output, the skill raises a blocker instead of inferring columns from it.

Safety and scale

  • Three approval gates (scope, plan, deployment). A partial wildcard plan is never offered, and cancelling always leaves the report intact.
  • Verification repeats discovery from scratch rather than trusting earlier notes, and reconciles counts before reporting completion.
  • Bounded, resumable batches with persistent CSV ledgers keep the workflow reliable at large number of configurations without issuing per-item Dataverse calls.

Reporting

Each run writes docs/webapi-selectall-migration/migration-report.html from a bundled template — wildcards with proposed fixes, already-explicit settings, call coverage, gaps, and verification results. The report is responsive and accessible, and reuses the existing Power Pages report styling. Reports exclude absolute paths, URLs, tokens, and data values; CSV ledgers are generated from header-only assets so the output format stays stable across runs.

Implementation notes

All semantic decisions stay with the agent. The only deterministic script is query-table-schema.js, which retrieves Dataverse table, attribute, and relationship metadata using sequential requests, retry/backoff, token refresh, and checkpoint resume.

The skill is registered in the plugin README, the approval-gate catalog (§6.32), and the skill-tracking table.

Replaces deprecated `Webapi/<table>/fields = *` values with least-privilege
explicit columns proven by the site's own Web API calls and response
consumers. Supports traditional/Liquid sites and React, Vue, Angular, and
Astro code sites, and excludes compiled or generated output from analysis.

Adds the skill workflow, column-analysis and reporting references, a
Dataverse schema-retrieval script, HTML report plus CSV ledger assets,
large-scale batching guidance, and unit tests. Registers the skill in the
plugin README, approval-gate catalog, and skill-tracking table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant