Qore CdsRestClient Module Reference  1.0

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:
#!/usr/bin/env qore
%new-style
%strict-args
%require-types
%enable-all-warnings
%requires CdsRestClient
hash<auto> opts = {
"url": "https://my-instance.crm2.dynamics.com",
"client_id": "30e61334-15db-4171-a752-b7c70dca1ebb",
"client_secret": "M09tfOc&NoEP(XCEKkT:T&V<lKR%+=h9hw",
"tenant": "bef147c4-8dd3-4e18-9af8-9573d86d3738",
};
CdsRestClient rest(opts);
hash<auto> ans = rest.get("...");
printf("%N\n", ans.body);
string printf(string fmt,...)

Release Notes

CdsRestClient v1.0

  • the initial version of the CdsRestClient module