Practical examples for working with the Dataverse Web API in Dynamics 365 and Microsoft Power Platform solutions.
This repository focuses on the common query and data access patterns developers use when reading and writing Dataverse data through HTTP APIs.
It's designed as a practical reference, not formal documentation.
This repo is aimed at developers, integration specialists, solution architects, and technical consultants who need practical Dataverse Web API examples.
It's especially useful if you're building integrations, scripts, automation utilities, Azure-based services, or troubleshooting query behaviour in real environments.
If you're new to querying Dataverse, a good reading order is:
- Basics for endpoint shapes and simple reads
- Filtering for common query constraints
- Select and Expand for efficient payload design
- Pagination before working with larger result sets
Then use these as needed:
- Create, Update, Delete for write operations
- Lookup Columns for relationship field handling
- Formatted Values for display-friendly responses
- FetchXML for more complex querying scenarios
- Integration Tips for reliability and architecture guidance
| Guide | Summary |
|---|---|
| Basics | Core Dataverse Web API query patterns, endpoint shapes, and record retrieval examples. |
| Filtering | Common $filter examples for equality, multiple conditions, dates, and null handling. |
| Select and Expand | How to reduce payloads with $select and retrieve related records with $expand. |
| Pagination | Practical guidance for handling paged Dataverse API responses safely. |
| Create, Update, Delete | Basic write operations using POST, PATCH, and DELETE. |
| Lookup Columns | How to set and validate lookup values using the correct navigation property names. |
| Formatted Values | When and how to request formatted values for display and debugging. |
| FetchXML | When FetchXML is useful for more complex or platform-specific query scenarios. |
| Integration Tips | Reliability, performance, and architecture advice for Dataverse integrations. |
Practical sample code is available in examples/:
- C# basic query
- C# create, update, delete
- C# lookup binding
- C# formatted values
- C# pagination
- C# select and expand
- C# filtering
- Python basic query
- Python create, update, delete
- Python lookup binding
- Python formatted values
- Python pagination
- Python select and expand
- Python filtering
- PowerShell basic query
- PowerShell create, update, delete
- PowerShell lookup binding
- PowerShell formatted values
- PowerShell pagination
- PowerShell select and expand
- PowerShell filtering
- JavaScript basic query
- JavaScript create, update, delete
- JavaScript lookup binding
- JavaScript formatted values
- JavaScript pagination
- JavaScript select and expand
- JavaScript filtering
- integration with external systems
- Azure Functions calling Dataverse
- migration and scripting tasks
- automation utilities
- API troubleshooting
- learning Dataverse query syntax
Examples use simplified sample table and column names for readability.
Always validate exact table logical names, column logical names, permissions, and API versions in your environment.
Maintained by Matthew Brunsdon.