Skip to main content
Question

List of available variables in scripts

  • February 15, 2024
  • 6 replies
  • 70 views

Franky779
Forum|alt.badge.img+7

Hi folks,

 

is there an overview which variables are available from computers and mobile devices that can be used in scripts?

Greetings Frank

6 replies

Franky779
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 15, 2024

Sorry, theres no edit:

We want to push hardware data (serialnumber, model etc. etc.) from jamf to an external database (iDoIt).


Franky779
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 15, 2024

Meanwhile i found https://learn.jamf.com/bundle/jamf-pro-documentation-current/page/Computer_Configuration_Profiles.html

 

But those are kinda basic. I need more of the hardware informations.

  • Model
  • Processor Type
  • Operating System Version
  • Jamf Pro Computer ID

 

And hopefully i don´t have to use a configuration profile for this. A script type python via policy on enrollment would be best.


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • February 15, 2024

Sorry, theres no edit:

We want to push hardware data (serialnumber, model etc. etc.) from jamf to an external database (iDoIt).


The only way to export data from Jamf is using Jamfs API. All of the info you listed in your other comment is available with Jamf API.

Jamf Pro API Overview


Franky779
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 15, 2024

The only way to export data from Jamf is using Jamfs API. All of the info you listed in your other comment is available with Jamf API.

Jamf Pro API Overview


OK, i have an working api call already. Thought those variables would be available on a more easy way :-)

so just to confirm:

  1. i create a policy which gets executes on "enrollment complete"
  2. in this policy i call a python script
  3. this script does the api shenanigans and pushes it to out database api

Thats it basically?


Franky779
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 15, 2024

OK, i have an working api call already. Thought those variables would be available on a more easy way :-)

so just to confirm:

  1. i create a policy which gets executes on "enrollment complete"
  2. in this policy i call a python script
  3. this script does the api shenanigans and pushes it to out database api

Thats it basically?


And $SERIALNUMBER should be available in script right? I need an identifier für the api call


Franky779
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 15, 2024

OK, i have an working api call already. Thought those variables would be available on a more easy way :-)

so just to confirm:

  1. i create a policy which gets executes on "enrollment complete"
  2. in this policy i call a python script
  3. this script does the api shenanigans and pushes it to out database api

Thats it basically?


Meh....i just can query on id. But there is no variable für tje jamf id!?