105 const OAuth2AuthUrl =
"https://login.microsoftonline.com";
108 const OAuth2TokenUriPathSuffix =
"/oauth2/v2.0/token";
111 const DefaultApiVersion =
"9.1";
114 const RequestUriPathPrefix =
"/api/data/v";
119 string client_secret;
197 hash<auto> doRequest(
string m,
string path,
auto body, *reference<hash<auto>> info, softbool decode_errors = True, *hash<auto> hdr);
208 hash<auto>
sendAndDecodeResponse(*data body,
string m,
string path, hash<auto> hdr, *reference<hash<auto>> info, *softbool decode_errors);
255 "cls": Class::forName(
"CdsRestConnection"),
256 "options": RestConnection::ConnectionScheme.options + {
257 "api": <ConnectionOptionInfo>{
259 "desc":
"the API version for CDS",
262 "client_id": <ConnectionOptionInfo>{
264 "desc":
"the Microsoft Common Data Service OAuth2 client ID",
266 "client_secret": <ConnectionOptionInfo>{
268 "desc":
"the Microsoft Common Data Service OAuth2 client secret",
271 "tenant": <ConnectionOptionInfo>{
273 "desc":
"the tenant ID",
275 "scope": <ConnectionOptionInfo>{
277 "desc":
"the OAuth2 scope for the login; the default it to use the target URL + `/.default`",
280 "required_options":
"client_id,client_secret,tenant",
294 constructor(
string name,
string description,
string url, hash<auto> attributes = {}, hash<auto> options = {})
string getApi()
returns the CDS REST API version currently in use
const DefaultApiVersion
Default API version.
Definition: CdsRestClient.qm.dox.h:111
*string getToken()
returns the access token
constructor(hash< auto > opts, *softbool do_not_connect)
creates the object with the given options
static string getString(hash< auto > opts, string key)
gets a string option
loginIntern(*reference< hash< auto > > info)
performs authentication and authorization with SAP using the OAuth2 authorization URL
hash< auto > sendAndDecodeResponse(*data body, string m, string path, hash< auto > hdr, *reference< hash< auto > > info, *softbool decode_errors)
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()
static error(string fmt)
throws an exception due to an error
class for Microsoft Common Data Service REST connections; returns CdsRestClient objects
Definition: CdsRestClient.qm.dox.h:250
setChildCapabilities()
Sets child data provider capabilities.
DataProvider::AbstractDataProvider getDataProvider()
returns a data provider object for this connection
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
const ConnectionScheme
Connection entry info.
Definition: CdsRestClient.qm.dox.h:254
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the CdsRestConnection object
bool hasDataProvider()
returns True as this connection returns a data provider with the getDataProvider() method
CdsRestClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a CdsRestClient object
string getType()
returns "cdsrest"
the CdsRestClient namespace contains all the objects in the CdsRestClient module
Definition: CdsRestClient.qm.dox.h:88