Skip to main content

how to get the deviceId id from jamf API

 

i want to bring the compliance details 

Hope this might help..

#! /bin/sh

 

# server connection information

jamfProURL="https://XX.jamfcloud.com"

username=“<local Jamf username should come here>”

password=“<local Jamf password should come here>“

 

## get computer ID from Jamf server

compId=$( /usr/bin/curl \\

--request GET \\

--url "$jamfProURL/JSSResource/computers/udid/${udid}/subset/general" \\

--header "Authorization: Bearer $token" \\

--header "Accept: application/xml" \\

| /usr/bin/xpath -e '/computer/general/id/text()' 2> /dev/null )

 

echo “${compID}”


Reply