Skip to main content
Solved

Request for example code to use API endpoints to upload CSV file for Inventory Preload


Forum|alt.badge.img+2
  • New Contributor
  • 1 reply

Hi,

I tried to use the API to validate and then upload a CSV file to the Inventory preload:

https://developer.jamf.com/jamf-pro/reference/post_v2-inventory-preload-csv-validate

https://developer.jamf.com/jamf-pro/reference/post_v2-inventory-preload-csv

I am able to use other API calls. Just these with the file upload I can not figure out and always get a 400 error.

Could someone share some example code on how to use those 2 API endpoints?

Thanks,

Christian

Best answer by mdp

Some of the example code on those CSV reference pages is incorrect/misleading, but I believe I figured it out:
https://github.com/MatthewPrins/Jamf/blob/main/Upload_CSV_to_Preload.sh

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+8
  • Contributor
  • 37 replies
  • Answer
  • October 19, 2022

Some of the example code on those CSV reference pages is incorrect/misleading, but I believe I figured it out:
https://github.com/MatthewPrins/Jamf/blob/main/Upload_CSV_to_Preload.sh


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • 1 reply
  • October 19, 2022

Awesome! Thank you, Matthew! 

The API user does need CRUD access to "Users" and "Inventory Preload Records"


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings