Read list of commands - 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

Product name
Basic Services client library for .NET (and COM)
Metasys API
Document type
API Reference Guide
Document number
Revision date
English (United States)

Use the GetCommands method to retrieve a list of all available commands on an object. Additionally use the ToList() method to display any information associated with the object. When you send a command, use the command.CommandId parameter. The command.Items property lists all of these values including their title and type.

Table 1. Get commands .NET signature
Library method name GetCommands
Description Get all commands on an object.
Method signature IEnumerable<Command> GetCommands(Guid id);
Method input parameters id: the object GUID the method targets to obtain a list of possible commands.
Return value A collection of Command objects.
The following .NET C# code is an example of a successful response to get commands:
List<Command> commands = client.GetCommands(objectId).ToList();
Command command = commands.FindById("Adjust"); // Adjust
    "Title": "Adjust",
    "TitleEnumerationKey": "commandIdEnumSet.adjustCommand",
    "CommandId": "Adjust",
    "Items": [
        "Title": "Value",
        "Type": "number",
        "EnumerationValues": null,
        "Minimum": null,
        "Maximum": null