Monday
Hi guys,
Could someone point me to the right direction how to find what field must be used in GraphQL getAssetResources query to get values of the field OSname in the table tsysOS (Win 2012 R2, Win 2016, etc.).
Currently we are using the following query but none of the listed fields have these values:
query getAssetResources {
site(id: "{{site_id}}") {
assetResources(
assetPagination:
{
limit: 100,
page: FIRST,
cursor: ""
}
fields: [
"key",
"url",
"assetCustom.stateName",
"assetBasicInfo.name",
"assetBasicInfo.type",
"assetBasicInfo.mac",
"assetBasicInfo.scannerType",
"assetBasicInfo.userDomain",
"assetCustom.manufacturer",
"assetCustom.model",
"networkAdapters.macAddress",
"networks.ipAddressV4",
"operatingSystem.osType"
"operatingSystem.caption",
"operatingSystem.name",
"operatingSystem.codeset",
"operatingSystem.buildNumber",
"operatingSystem.buildRevNumber",
"operatingSystem.hostName",
"operatingSystem.organization",
"operatingSystem.osProductSuite"
]
filters: {
conjunction: AND,
conditions:
[
{
operator: EQUAL,
path: "assetCustom.stateName",
value: "Active"
},
{
operator: LIKE,
path: "assetCustom.manufacturer",
value: "VMware"
}
]
}
)
{
items
pagination {
next
}
}
}
}
Monday - last edited Monday
Hi,
operatingSystem.name will get you the name of the OS. For example, in the attached image, Fedora 27 (Server Edition) will be returned when you query operatingSystem.name. Please make sure the assets you are querying have this field filled in your Lansweeper Site as this is where the API would be pulling from. Furthermore, please make sure that the assets you are querying do have this field filled in and that your filter is not filtering them out.
Finally, if you are having issues finding a specific field or if a specific field does not appear that it can be queried, please feel free to contact support.
Thanks!
Tuesday
Hi Ethan,
Thank you for your quick response.
However your answer is not exactly matching the same observations as we can see on our system.
When we look at the column tsysOS.OSname (on-premisses Lansweeper instance) it displays shortened symbolic version of operating system: Win 2012 R2, Win 2016, etc.
But when we get data through API the field operatingSystem.name displays full name of operating system: Microsoft Windows Server 2022 Datacenter, Debian GNU/Linux 12 (bookworm) Version 12.8, etc.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now