Hi Dojo,
Is there any fast and optimized way to retrieve the elements on a DMS that are using a certain type of connector?
I know that we can retrieve all the elements present on the DMS.
Just wondering if we have a call that does the filtering already 🙂
Thank you,
Ana
Hi Ana,
If using an automation script you can use the Engine method FindElementsByProtocol, which will allow you to filter either per protocol or per protocol and version.
If wanting to use it elsewhere, you can use the GetLiteElementInfo SLNet message similar to this answer but instead of filling in the DataMiner Id and Element Id of a specific element, you leave them with their default values and select the correct value for the Protocol Name and Version.
Something like
GetLiteElementInfo glei = new GetLiteElementInfo();
glei.ProtocolName = "Skyline Protocol Name";
glei.ProtocolVersion = "1.0.0.1";
glei.IncludePaused = true;
glei.IncludeStopped = true;
Do note that these SLNet calls are internal calls and we tend to not recommend using them, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice.
Hope it helps
Just to add a small clarification in regards to the SLNet usage, in order for this to work the Send Message variant must be used instead of the Send Single Response variant as in the linked question.