CdsRestClient Introduction
The CdsRestClient module provides an API for calling Microsoft Dynamics 365 Common Data Service REST services.
To use this module, use "%requires CdsRestClient" in your code.
All the public symbols in the module are defined in the CdsRestClient namespace.
The main classes are:
- CdsRestClient: this class provides the REST client API for communuication with the Microsoft Dynamics 365 Common Data Service REST API; it also automates authentication and authorization to the target
- CdsRestConnection: provides a REST connection object to a Microsoft Dynamics 365 Common Data Service server (based on the ConnectionProvider module)
- Example:
- 
-   - %new-style - %strict-args - %require-types - %enable-all-warnings -   - %requires CdsRestClient -   - hash<auto> opts = { -     "url": "https://my-instance.crm2.dynamics.com", -     "oauth2_client_id": "30e61334-15db-4171-a752-b7c70dca1ebb", -     "oauth2_client_secret": "M09tfOc&NoEP(XCEKkT:T&V<lKR%+=h9hw", - }; -   - CdsRestClient rest(opts); - hash<auto> ans = rest.get("..."); - printf("%N\n", ans.body); 
 
Release Notes
CdsRestClient v2.0
- updated to use the OAuth2 infrastructure
CdsRestClient v1.0
- the initial version of the CdsRestClient module