Hi, thanks for the nice package.
I have a problem when using the UpdateComputerInventoryDetailByID function since it requires a structure
ComputerInventory as the input.
The problem is that if I take a simple scenario where I only want to change Name filed for example:
ComputerInventoryDataSubsetGeneral{
Name: "TEST",
}
After calling UpdateComputerInventoryDetailByID with such struct it will pass to JAMF (PATCH /api/v1/computers-inventory-detail) at least such JSON:
{"name":"TEST","remoteManagement":{},"reportDate":"0001-01-01T00:00:00Z","lastContactTime":"0001-01-01T00:00:00Z","lastCloudBackupDate":"0001-01-01T00:00:00Z","lastEnrolledDate":"0001-01-01T00:00:00Z","mdmProfileExpiration":"0001-01-01T00:00:00Z"}
Jamf server will return HTTP 400 in this case.
But if you will look into Jamf docs about which fields actually can be passed via API (https://developer.jamf.com/jamf-pro/reference/patch_v1-computers-inventory-detail-id) you can see that there no way to update anything.
Only idea which i can suggest here it allow to pass into NewClient pointer to custom json marshal unmarshal functions which will add flexibility to solve this issue since wrote own marshal function more correct way for me. Of course i can implement own function and call DoRequest directly as workaround with custom JSON.
Hi, thanks for the nice package.
I have a problem when using the UpdateComputerInventoryDetailByID function since it requires a structure
ComputerInventory as the input.
The problem is that if I take a simple scenario where I only want to change Name filed for example:
After calling UpdateComputerInventoryDetailByID with such struct it will pass to JAMF (PATCH /api/v1/computers-inventory-detail) at least such JSON:
Jamf server will return HTTP 400 in this case.
But if you will look into Jamf docs about which fields actually can be passed via API (https://developer.jamf.com/jamf-pro/reference/patch_v1-computers-inventory-detail-id) you can see that there no way to update anything.
Only idea which i can suggest here it allow to pass into NewClient pointer to custom json marshal unmarshal functions which will add flexibility to solve this issue since wrote own marshal function more correct way for me. Of course i can implement own function and call DoRequest directly as workaround with custom JSON.