Repository navigation
Offer the whole Dataverse Web API: OData's conventions, its headers, batches and search - #436
Merged
Merged
Conversation
…batches and search The generator now derives every OData address of a CSDL service: the service document, `$count`, one column and its content, casts to derived types, related rows by key, `$ref` reads and writes, replacing a row with PUT, and actions and functions the CSDL does not describe, bound or unbound, with parameter aliases. Its REST runtime leaves out optional segments, sends exploded maps as query parameters, uploads file bodies as bytes and rejects empty path values. The Dataverse template takes the Web API's headers and query options on every method, returns the answer headers that carry results, such as a created row's OData-EntityId, answers not_modified, runs $batch with change sets under one approval, and offers the search endpoint /api/search/v2.0.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 0306ef8 | Nov 26 2026, 09:23 PM |
…s hide A new row whose body binds existing rows, such as [email protected], changes them, so it asks like an update. Functions that write, CalculateRollupField, IncrementKnowledgeArticleViewCount, ResetInheritedAccess and RemoveActiveCustomizations, ask too, and so does CloneAsPatch, which locks its parent solution. Calls by name and requests of a batch, including those on a Content-ID's row, take the change of the known operation they reach. Batch answers are parsed as bytes and returned as their media type says. Only map inputs send their fields as query parameters. Row queries take parameter aliases and LabelLanguages, creating a row takes $expand, lists type their delta link, uploads take x-ms-file-name as a header, and downloads return the mimetype header.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Dataverse template now covers the Web API as Microsoft documents it. Every request kind and header the docs describe is a method or an input, so an agent that builds an app from the Web API documentation finds each documented request where it expects it. The app's users still act with their own accounts, and Dataverse's security roles decide what each request may do.
Generator
The generator derives OData's addresses for any CSDL service:
$countfor a table and for related rows$valuefor its content$ref: read, set and deletePUTon rows, which Dataverse requires for table and column definitionsThe shared REST runtime, synced to every REST template:
filebody (format: binary) as bytes with its media typeDataverse template
CallerObjectIdandMSCRMCallerID.MSCRM.Bypass*headers andtag.ConsistencyandMSCRM.SessionToken.MSCRM.SolutionUniqueName,MSCRM.MergeLabels,MSCRM.SuppressDuplicateDetection,savedQuery,userQuery,UnMaskedData,partitionId,Range,size, and the chunked-upload headers.OData-EntityId, theLocationandx-ms-chunk-sizeof a chunked upload,x-ms-session-token,ETag, and a file's name and size.not_modified.getRowwithifNoneMatchreturnsnot_modifiedwhen the row is unchanged.batchruns$batch.Authorizationheader, and$nreferences to rows no request creates.[email protected], changes them and asks like an update.CalculateRollupField,IncrementKnowledgeArticleViewCount,ResetInheritedAccessandRemoveActiveCustomizations.CloneAsPatchcounts as an update, because a patch locks its parent solution.callAction,callFunctionand the bound variants, and every request of a batch (including one on a Content-ID's row), use the change of the known operation they reach.searchV2*methods call Dataverse search at/api/search/v2.0.Tests
pnpm lint,pnpm typecheckandpnpm format:checkpass.$batchwith a change set$count