connectionDiscoverWithHttpInfo method

Future<Response> connectionDiscoverWithHttpInfo(
  1. String id, {
  2. required String uuidToken,
  3. ConnectionDiscoverRequest? connectionDiscoverRequest,
})

Discovers PLC metrics.

Discovers the metrics of the given connection. Returns an array of string's object. This option is currently avaiable only for the OPCUA connection. If another connection is given, an error will be returned. If an Internal Server Error occours, an Error object will be returned.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> connectionDiscoverWithHttpInfo(
  String id, {
  required String uuidToken,
  ConnectionDiscoverRequest? connectionDiscoverRequest,
}) async {
  // ignore: prefer_const_declarations
  final path = '${LbWriterEnvironment.getApiEndpoint(
    iotUuid: uuidToken,
  )}/connection/$id/discover';

  // ignore: prefer_final_locals
  Object? postBody = connectionDiscoverRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}