Reference By Name
Accessing devices by name​
All devices which require a device id, can also be references by their name (as defined by the .name
property).
If more than one device has the same name, then only the first result will be matched.
The following shows how the get a list of alarms for a device by only referencing the device by its name:
- Shell
- PowerShell (native)
- PowerShell (PSc8y)
c8y alarms list --device myDevice
c8y alarms list --device myDevice
Get-AlarmCollection -Device myDevice
info
Lookup by name is not enabled for c8y inventory
commands as name is generally not unique enough.
Get application by name​
Applications can also be referenced by its name, making it easier to use:
- Shell
- PowerShell (native)
- PowerShell (PSc8y)
c8y applications get --id cockpit
c8y applications get --id cockpit
Get-Application -Id cockpit