Get equipment - Metasys - LIT-12013522 - Software Application - Basic Services client library for .NET (and COM) - Metasys API - 4.2

Metasys REST Client for .NET and COM Developer Guide

Brand
Metasys
Product name
Basic Services client library for .NET (and COM)
Metasys API
Document type
API Reference Guide
Document number
LIT-12013522
Version
4.2
Revision date
2021-04-07
Language
English (United States)

To get all the equipment on your server use the GetEquipment method, the library delivers a list of MetasysObject.

Table 1. Get equipment .NET signature
Library method name GetEquipment
Description Get all equipment on your server.
Method signature IEnumerable<MetasysObject>GetEquipment();
Method input parameters None
Return value A collection of MetasysObject that represent equipment.
The following .NET C# code is an example of a successul get equipment call:
List<MetasysObject> equipment = client.GetEquipment().ToList();
MetasysObject sampleEquipment = equipment.FirstOrDefault();
Console.WriteLine(sampleEquipment);
/*                       
  {
    "ItemReference": "Win2016-VM2:Win2016-VM2/equipment.vNAE2343947.Field Bus MSTP1.AHU-07",
    "Id": "6c6e18b8-015f-572a-814c-1e5d66142850",
    "Name": "AHU-07",
    "Description": null,
    "Type": 3,
    "TypeUrl": null,
    "Category": null,
    "Children": [],
    "ChildrenCount": 0
  }
*/