08-04-2023 08:20 AM - last edited on 04-01-2024 02:55 PM by Mercedes_O
Hey everyone,
sorry if I am asking an obvious question.
I've been playing around with the LS cloud API but I cannot get custom fields from it no matter what I try.
I get responses just fine when querying for the below informations.
However, as soon as I add assetcustom.fields to the fields, I get an error.
09-07-2023 10:48 AM
Hi Maxl,
custom fields are actually available in the public API, as you can read here:
https://docs.lansweeper.com/docs/api/types#assetcustom
The correct path to those are:
assetCustom.fields.value
assetCustom.fields.fieldKey
assetCustom.fields.name
I hope this helps
08-09-2023 05:34 PM
I was just going to post a question on this topic when I found your post. I'm hoping I'm wrong, but from what I can see at this point, custom fields in Lansweeper Cloud can only be used for defining custom views. They are not available to use for reporting, nor are they available via the API.
I'm hoping I'm wrong and someone can correct me. I find Lansweeper's direction regarding custom data (or lack thereof) to be very frustrating so far.
08-16-2023 10:09 AM - edited 08-16-2023 10:10 AM
Hey,
I was playing around some more with it. Turns out as of right now you can only filter a few set of fields with the API.
When you try to filter a field that was not meant to be queried, you get this response.
There is an invalid path for filter. Path values can only be: key, installationId, assetBasicInfo.type, assetBasicInfo.name, assetBasicInfo.domain, assetBasicInfo.ipAddress, assetBasicInfo.mac, assetBasicInfo.description, assetBasicInfo.userName, assetCustom.stateName, assetCustom.dnsName, assetCustom.stateName, assetCustom.serialNumber, assetCustom.manufacturer, assetCustom.model, installKey, assetCustom.purchaseDate, assetCustom.warrantyDate, assetBasicInfo.firstSeen, assetBasicInfo.lastSeen
So yeah. As of right now the API is useless IMO. Why care creating an API when I can't query for every single field?
Regards,
Matthias
09-07-2023 10:51 AM
Hi Maxl, it's true that custom fields are not filterable properties in the API. Thanks for the input, we'll work on that!
Please keep an eye on the Release Notes section to see updates!
https://docs.lansweeper.com/docs/release-notes/
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now