Qore CdsRestClient Module Reference 2.0
|
this class provides the REST client API for communication with Microsoft Dynamics 365 Common Data Service servers More...
#include <CdsRestClient.qm.dox.h>
Public Member Methods | |
constructor (hash< auto > opts, *softbool do_not_connect) | |
creates the object with the given options | |
string | getApi () |
returns the CDS REST API version currently in use | |
Static Public Member Methods | |
static hash< auto > | getOptions (hash< auto > opts) |
returns options for the CdsRestClient::CdsRestClient::constructor() | |
static | raiseError (string fmt,...) |
throws an exception due to an error | |
this class provides the REST client API for communication with Microsoft Dynamics 365 Common Data Service servers
This class requires the following options for Microsoft Dynamics 365 Common Data Service authentication and authorization to the target server:
client_id:
the OAuth2 client IDclient_secret:
the OAuth2 client secrettenant:
the tenant IDErrors returned from Dynamics will have the following format:
err:
will be the hex error code from Dynamics (ex: 0x8006088a
)desc:
the exception message (ex: Resource not found for the segment 'WhoAmi'.
)arg:
the error hash from the server plus a decoded_body
argument with any decoded message body CdsRestClient::CdsRestClient::constructor | ( | hash< auto > | opts, |
*softbool | do_not_connect | ||
) |
creates the object with the given options
opts | valid options are the same as RestClient with the following differences:
|
do_not_connect | if False (the default), then a connection will be immediately established to the remote server |
RESTCLIENT-ERROR | invalid option passed to constructor, unsupported data serialization, etc |
CDSRESTCLIENT-ERROR | missing or invalid required option for REST authentication or communication |