105 const OAuth2BaseUrl =
"https://login.microsoftonline.com/";
108 const OAuth2AuthUriPathSuffix =
"/oauth2/v2.0/authorize";
111 const OAuth2TokenUriPathSuffix =
"/oauth2/v2.0/token";
114 const OAuth2AuthUrl= sprintf(
"%scommon%s", OAuth2BaseUrl, OAuth2AuthUriPathSuffix);
117 const OAuth2TokenUrl = sprintf(
"%scommon%s", OAuth2BaseUrl, OAuth2TokenUriPathSuffix);
120 const DefaultApiVersion =
"9.2";
123 const RequestUriPathPrefix =
"/api/data/v";
126 const DefaultBusinessCentralBaseUri =
"https://api.businesscentral.dynamics.com/";
129 const DefaultDynamicsPingMethod =
"GET";
132 const DefaultDynamicsPingPath =
"{api_uri_path}/WhoAmI";
135 const DefaultDynamicsPingHeaders = ...;
139 const ApiProfiles = ...;
191 hash<auto>
sendAndDecodeResponse(*data body,
string m,
string path, hash<auto> hdr, *reference<hash<auto>> info, *softbool decode_errors, *
string assume_content_type, *
string shdr, *code signer);
316 bool isAuthTokenError(
int status_code, hash<auto> headers,
bool body_deserialized, *
string body_content_type,
auto body);
382 + {
"api_profile":
"dynamics"})}, attr) {
string getApi()
returns the CDS REST API version currently in use
static raiseError(string fmt,...)
throws an exception due to an error
constructor(hash< auto > opts, *softbool do_not_connect)
creates the object with the given options
hash< auto > sendAndDecodeResponse(*data body, string m, string path, hash< auto > hdr, *reference< hash< auto > > info, *softbool decode_errors, *string assume_content_type, *string shdr, *code signer)
sends the outgoing HTTP message and recodes the response to data
static hash< auto > getOptions(hash< auto > opts)
returns options for the CdsRestClient::CdsRestClient::constructor()
class for Microsoft Common Data Service REST connections; returns CdsRestClient objects
Definition CdsRestClient.qm.dox.h:210
string getAuthorizationCodeRequest(hash< AuthCodeInfo > info=< AuthCodeInfo >{})
Returns a URI for an authorization code request.
string getAuthUrl(*bool allow_relative)
Returns the OAuth2 auth URL or throws an exception if not set.
setChildCapabilities()
Sets child data provider capabilities.
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
const OAuth2StandardToCdsOptionMap
Maps standard option names to CDS REST option names.
Definition CdsRestClient.qm.dox.h:226
static hash< auto > getOptions(string url, *hash< auto > orig_opts)
returns options for CdsRestConnection::constructor()
const ConnectionScheme
Connection entry info.
Definition CdsRestClient.qm.dox.h:214
const OAuth2Options
Maps CDS REST options to standard options.
Definition CdsRestClient.qm.dox.h:222
const OAuth2AuthRequestOptions
options required to support the OAuth2 authorization code grant flow
Definition CdsRestClient.qm.dox.h:218
bool isAuthTokenError(int status_code, hash< auto > headers, bool body_deserialized, *string body_content_type, auto body)
Returns True if the response was related to an authorization token error.
const OAuth2DifferentOptionMap
Different OAuth2 option map; standard name => extern name.
Definition CdsRestClient.qm.dox.h:229
bool hasDataProvider()
returns True as this connection returns a data provider with the getDataProvider() method
hash< auto > getOAuth2Options()
Returns OAuth2 options in a standard format.
CdsRestClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a CdsRestClient object
checkAuthCodeFeature()
Sets the auth code feature if supported.
constructor(hash< auto > config, *hash< auto > attr)
creates the CdsRestConnection object
DataProvider::AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
returns a data provider object for this connection
string getOAuth2OptionName(string opt)
Returns the OAuth2 option name for this connection.
string getTokenUrl(*bool allow_relative)
Returns the OAuth2 token URL or throws an exception if not set.
string getType()
returns "cdsrests"
For REST connections to Microsoft Dynamics.
Definition CdsRestClient.qm.dox.h:356
const ConnectionScheme
Connection entry info.
Definition CdsRestClient.qm.dox.h:360
string getType()
returns "dynamics"
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
constructor(hash< auto > config, *hash< auto > attr)
creates the CdsRestConnection object
Definition CdsRestClient.qm.dox.h:381
*hash< auto > getOptions()
the CdsRestClient namespace contains all the objects in the CdsRestClient module
Definition CdsRestClient.qm.dox.h:89