Skip to main content
Question

Google Script Inventory API

  • November 24, 2024
  • 1 reply
  • 4 views

Forum|alt.badge.img+1

Dear All

Let me first start by apologising as I am new to APIs and getting them working, also fairly new to scripting. I have checked on the forums and I keep going around in circles. I have spent a lot of the weekend trying to get this to work and even trying to get chatgpt to assist (But its a bit useless). 

I am trying to build out an asset system on Google Sheets where I pull in inventory data in one (Live) tab and then use a lookup formula to pull in the relevant data from the LIVE tab into another TAB. 

 

WHAT I WANT TO ACHIEVE

I want to be able to build a Google Script that pulls inventory data from JAMF into a tab called LiveInventory on my Google sheet.
I have created an api user and defined clients/roles/privileges in JAMF. I've also setup an advanced search for the api user.
What I have is so far from following some instructions are
- USER CREDENTIALS
- CLIENT ID
- CLIENT SECRET
- JAMF URL

I tried copying a script from years ago but to no avail. Please help and my apologies to throw in a request that is more than likely really easy for everyone else.

 

Thank you for any help

1 reply

ega
Forum|alt.badge.img+16
  • Valued Contributor
  • 141 replies
  • November 25, 2024

There are a lot of ways to pull (or push) inventory with AppScript into a Google Sheet.  
A good place to start with the Jamf API is https://developer.jamf.com/jamf-pro/reference/computers
Notice there are examples in different scripting languages you can copy.
I don't know your challenge  but usually folks need to get the App Script down for making network calls to get the API data and then append it to the sheet.  Take a look at this project 
https://github.com/Magichat-Inc/GoogleAppsScript-for-Jamf
It will give you a good overview.

 


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