Posted on 09-05-2023 08:53 AM
how to get the deviceId id from jamf API
i want to bring the compliance details
Posted on 09-07-2023 02:34 AM
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}”