Don't know what you mean about "3rd party API problems" because the SDK is supported by LogicMonitor AFAIK and you're accessing LM's API.
The SDK documentation is built by Swagger which is the software LM uses to build the API in the first place. So, where the SDK documentation is lacking, think about this: the SDK is just a sexier skin on top of the API. So, for questions like "what values can i put in for fields?", you'd look in the API documentation here, here, and here.
That said, what you're looking for is to limit which fields are returned. For that, you simply supply a comma separated list of the fields you want back. There are two tricks to get it to work:
One is that you have to specify the fields as the API calls them, not as the SDK calls them. So, where the SDK outputs "display_name" for the display name, the API actually calls that field "displaName". And where the SDK calls it "preferred_collector_id", the API calls it "preferredCollectorId".
The other is that there are certain fields you always have to return. Those are "displayName,preferredCollectorId,name". So, if you want the id, the display name, the host_group_ids, and the created on fields, you'd need to specify it like this:
lm.get_device_by_id(id=9, fields="displayName,preferredCollectorId,name,hostGroupIds,createdOn")
However, when you make that call, you will notice that something like this will come back:
{'auto_balanced_collector_group_id': None,
'auto_properties': None,
'auto_props_assigned_on': None,
'auto_props_updated_on': None,
'aws_state': None,
'azure_state': None,
'collector_description': None,
'created_on': 1561139692,
'current_collector_id': None,
'custom_properties': None,
'deleted_time_in_ms': None,
'description': None,
'device_type': None,
'disable_alerting': None,
'display_name': 'Smart Panel 8x1G switch',
'enable_netflow': None,
'gcp_state': None,
'host_group_ids': '258,3',
'host_status': None,
'id': None,
'inherited_properties': None,
'last_data_time': None,
'last_rawdata_time': None,
'link': None,
'name': '10.7.255.251',
'netflow_collector_description': None,
'netflow_collector_group_id': None,
'netflow_collector_group_name': None,
'netflow_collector_id': None,
'preferred_collector_group_id': None,
'preferred_collector_group_name': None,
'preferred_collector_id': 106,
'related_device_id': None,
'scan_config_id': None,
'system_properties': None,
'to_delete_time_in_ms': None,
'up_time_in_seconds': None,
'updated_on': None,
'user_permission': None}
So, there's some major bugginess with regard to how the SDK handles "fields". The answer is to not try to filter in the call, but do filtering within your own script, which isn't too hard once you convert the returned data to a dictionary:
mydevice = lm.get_device_by_id(id=9).to_dict()
selected_fields = ['id','display_name','host_group_ids','created_on']
mydevice_with_selected_fields = {key: value for key, value in mydevice.items() if key in selected_fields}
for k,v in mydevice_with_selected_fields.items(): print(f"{k}: {v}")
Which lets you reference the fields as the SDK calls them and outputs something like this:
display_name: Smart Panel 8x1G switch
created_on: 1561139692
id: 9
host_group_ids: 258,3