Google Script Inventory API

tbedlow
New Contributor

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 1

ega
Contributor III

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.