Forum Discussion
Hi Shaun,
LogicMonitor's REST API devices resource includes the name (hostName, IP/DNS), displayName & id. Though the REST API operates based on resource ids, you can still filter your request by displayName, name, or any other parameter - so you should be able to get the same information as the RPC API (and actually the REST API provides more powerful filtering than the RPC API).
You are correct that filtering by name as you've done may return more than one result - you can avoid that by (1) filtering by displayName instead, as that is guaranteed to be unique (e.g. ?filter=displayName:prodServer123) or (2) adding preferredCollectorId to the filter, as the name/IP is guaranteed to be unique for a given Collector (e.g. filter=name~8.8.8.8,preferredCollectorId:9).
Does that answer your question? If not, can you provide the RPC request you're making that you're trying to replace with REST? That will help with context.
Thanks,
Sarah
Related Content
- 4 months ago