DynamicsWebApi is a comprehensive helper library designed for interacting with the Microsoft Dataverse Web API, including Microsoft Dynamics 365 Customer Engagement and Power Pages. Currently stable at v2.4.0, it receives regular updates, typically with patch and minor releases addressing fixes and introducing new features every few weeks or months. Key differentiators include robust support for Microsoft Dataverse Search API v2.0 (query, suggest, autocomplete), automated batch request management, handling of large file uploads/downloads in chunks, and automated conversion of long URLs into batch requests. The library supports standard CRUD operations, Fetch XML queries, Actions, Functions, and intricate table definition (metadata) queries. It is compatible with both Node.js environments (v17+) and modern browsers, offering features like `AbortSignal` for request cancellation and proxy configuration. It explicitly notes its scope does *not* include Microsoft Dynamics 365 Finance and Operations. This package is ideal for developers building integrations or client-side applications that need to communicate with Dataverse reliably and efficiently.
npm install dynamics-web-apiVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize `DynamicsWebApi` and execute a basic `WhoAmI` function call to retrieve the current user's ID, showing both console output and an alert dialog in a Dynamics 365 Web Resource context.
If an absolute URL for `@odata.id` is explicitly required in a non-`/$ref` POST request body, use the new utility function (e.g., `dynamicsWebApi.Utility.getAbsoluteIdUrl()`) to construct it manually before making the request.
Upgrade your Node.js environment to v17 or newer to ensure continued compatibility and access to support and future updates.
Ensure your application is served over HTTPS when deploying DynamicsWebApi in a browser context. For older browsers, consider polyfills for `Crypto.randomUUID` or using an earlier version of the library if HTTPS is not feasible.
Review the official documentation for Search API v2.0 and migrate to the new properties for `query`, `suggest`, and `autocomplete` functions to leverage full features and avoid potential future breaking changes.
Replace `fieldName` with `property` in your request objects when performing file operations (e.g., `uploadFile({ property: 'my_file_field', ... })`).This issue was a bug fixed in v2.2.1. Upgrade to DynamicsWebApi v2.2.1 or newer to resolve this problem with batch requests.
This specific issue was addressed and fixed in DynamicsWebApi v2.1.5. Ensure you are using version v2.1.5 or a newer release to prevent this problem.
No dependency data recorded yet.