Describes, how to invoke rest operations and sample code.
The Collector SDK ships with a set of management helpers to make the programmers’ job easier invoking the operations on the RestClient with Configuration Manager. The Configuration Manager requires a RestConfiguration object to be configured by the programmer, and pass it to the RestClient. Later, rest endpoints can be invoked through call_api definition.
# Setting up TCAConfigurationglobal Global rest_configuration = RestConfiguration() rest_configuration.host = self._config.get('HOST') response = rest_client.RestClient(configuration=rest_configuration) .call_api("/resource_path",'GET',preload_content=False, _return_http_data_only=True)