$darkmode
class for Microsoft Common Data Service REST connections; returns CdsRestClient objects More...
Public Member Functions | |
| constructor (string name, string description, string url, hash< auto > attributes={}, hash< auto > options={}) | |
| creates the CdsRestConnection object More... | |
| string | getAuthorizationCodeRequest (hash< AuthCodeInfo > info=< AuthCodeInfo >{}) |
| Returns a URI for an authorization code request. More... | |
| string | getAuthUrl (*bool allow_relative) |
| Returns the OAuth2 auth URL or throws an exception if not set. | |
| DataProvider::AbstractDataProvider | getDataProvider () |
| returns a data provider object for this connection More... | |
| string | getOAuth2OptionName (string opt) |
| Returns the OAuth2 option name for this connection. More... | |
| hash< auto > | getOAuth2Options () |
| Returns OAuth2 options in a standard format. More... | |
| string | getTokenUrl (*bool allow_relative) |
| Returns the OAuth2 token URL or throws an exception if not set. | |
| string | getType () |
returns "cdsrest" | |
| bool | hasDataProvider () |
| returns True as this connection returns a data provider with the getDataProvider() method More... | |
Public Attributes | |
| const | ConnectionScheme |
| Connection entry info. | |
| const | OAuth2AuthRequestOptions = ... |
| options required to support the OAuth2 authorization code grant flow | |
| const | OAuth2DifferentOptionMap = map {$1.value: $1.key} |
| Different OAuth2 option map; standard name => extern name. | |
| const | OAuth2Options |
| Maps CDS REST options to standard options. | |
| const | OAuth2StandardToCdsOptionMap = map {$1.value: $1.key} |
| Maps standard option names to CDS REST option names. | |
Protected Member Functions | |
| checkAuthCodeFeature () | |
| Sets the auth code feature if supported. | |
| hash< ConnectionSchemeInfo > | getConnectionSchemeInfoImpl () |
| Returns the ConnectionSchemeInfo hash for this object. | |
| CdsRestClient | getImpl (bool connect=True, *hash< auto > rtopts) |
| returns a CdsRestClient object More... | |
| setChildCapabilities () | |
| Sets child data provider capabilities. | |
Static Protected Member Functions | |
| static hash< auto > | getOptions (string url, hash< auto > orig_opts) |
| returns options for GoogleRestConnection::constructor() | |
class for Microsoft Common Data Service REST connections; returns CdsRestClient objects
supports options as in RestClient::RestClient with the following differences:
"api": the API version for CDS"api_profile": one of:none (no options set)dynamics (set client options for the MS Dynamics 365 API)"client_id": (required) the Microsoft Common Data Service OAuth2 client ID (instead of oauth2_client_id)"client_secret": (required) the Microsoft Common Data Service OAuth2 client secret (instead of oauth2_client_secret)"data": see DataSerializationOptions for possible values; the default is "json" "scope": the OAuth2 scope for the login; the default depends on the "api_profile" option"tenant": (required) the tenant ID| CdsRestClient::CdsRestConnection::constructor | ( | string | name, |
| string | description, | ||
| string | url, | ||
| hash< auto > | attributes = {}, |
||
| hash< auto > | options = {} |
||
| ) |
creates the CdsRestConnection object
| name | the name of the connection |
| description | connection description |
| url | connection URL (potentially with password info) |
| attributes | various attributes. See below |
| options | see the class documentation for valid options |
See ConnectionProvider::AbstractConnection::constructor() for attributes and options reference.
| CONNECTION-OPTION-ERROR | missing or invalid connection option |
| string CdsRestClient::CdsRestConnection::getAuthorizationCodeRequest | ( | hash< AuthCodeInfo > | info = < AuthCodeInfo >{} | ) |
Returns a URI for an authorization code request.
The oauth2_grant_type must be authorization_code, and oauth2_client_id, oauth2_auth_url, oauth2_redirect_url must set if the redirect_uri option is not used
| info | context information for the authorization code request |
| DataProvider::AbstractDataProvider CdsRestClient::CdsRestConnection::getDataProvider | ( | ) |
returns a data provider object for this connection
|
protected |
returns a CdsRestClient object
| connect | if True, then the connection is returned already connected |
| rtopts | this connection type does not accept any runtime options, so this parameter is ignored |
Returns the OAuth2 option name for this connection.
| hash<auto> CdsRestClient::CdsRestConnection::getOAuth2Options | ( | ) |
Returns OAuth2 options in a standard format.
| bool CdsRestClient::CdsRestConnection::hasDataProvider | ( | ) |
returns True as this connection returns a data provider with the getDataProvider() method