Web API Data operations Samples (Client-side JavaScript)
This article provides common understanding about Microsoft Dataverse Web API samples using client-side JavaScript. While each sample focuses on a different aspect of the Web API, they're presented within a common sample application.
Web API Samples using client-side JavaScript
The following samples use the patterns described here:
Sample | Sample Group | Description |
---|---|---|
Web API Basic Operations Sample (Client-side JavaScript) | Web API Basic Operations Sample | Demonstrates how to create, retrieve, update, delete, associate, and disassociate Dataverse table rows (entity records). |
Web API Query Data Sample (Client-side JavaScript) | Web API Query Data Sample | Demonstrates how to use OData v4 query syntax and functions and Dataverse query functions. Includes demonstration of working with predefined queries and using FetchXML to perform queries. |
Web API Conditional Operations Sample (Client-side JavaScript) | Web API Conditional Operations Sample | Demonstrates how to perform conditional operations. The behavior of these operations depends on criteria you specify. |
Web API Functions and Actions Sample (Client-side JavaScript) | Web API Functions and Actions Sample | Demonstrates how to use bound and unbound functions and actions, including custom actions. |
How to download the source code for the sample
These samples are implemented as JavaScript classes that run within a SPA application. This application is on GitHub at PowerApps-Samples/tree/master/dataverse/webapi/JS/SPASample.
The source code for each sample is available in the /src/samples folder. You can also view the source code of the samples in the respective article.
How to run the sample to see the script in action
View the README for information about how you can run the sample SPA application. When the SPA application runs, you can select which sample to run by clicking the buttons.
Common elements found in each sample
All the samples in this group have the following in common:
- They're all included in the same sample SPA application
- Each sample implements a common interface with
Setup
,Run
, andCleanup
methods. - All the samples use a common DataverseWebAPI.js sample library that demonstrates reusable methods to perform operations with business data in Dataverse.
See also
Use the Dataverse Web API
Web API Samples
Web API Samples (C#)
Web API Samples (PowerShell)