Try adding a "Saved Search" and pull that one via API.
Were you ever able to solve this? We would like to do the same thing.
Define a "Saved-Search" having the Criteria "Enrollment Method: PreStage enrollment" is "Your_Enrollment_name"
Query by it's id
URL: https://your.jss.url:8443/JSSResource/advancedcomputersearches/id/24
get the following output (stripped out a bit)
1{
2 "advanced_computer_search": {
3 "id": 24,
4 "name": "DEP-Search",
5 "criteria": [
6 {
7 "name": "Enrollment Method: PreStage enrollment",
8 "priority": 0,
9 "and_or": "and",
10 "search_type": "is",
11 "value": "Your_Enrollment_name"
12 }
13 ],
14 "display_fields": [
15 {
16 "name": "JAMF Binary Version"
17 },
18 {
19 "name": "Last Check-in"
20 },
21 {
22 "name": "Operating System"
23 }
24 ],
25 "computers": [
26 {
27 "id": 257,
28 "JAMF_Binary_Version": "9.97.1482356336",
29 "Operating_System": "Mac OS X 10.12.3"
30 },
31 {
32 "id": 258,
33 "JAMF_Binary_Version": "9.97.1482356336",
34 "Operating_System": "Mac OS X 10.12.3"
35 },
36 {
37 "id": 293,
38 "JAMF_Binary_Version": "9.97.1482356336",
39 "Operating_System": "Mac OS X 10.12.3"
40 },
41 {
42 "id": 295,
43 "JAMF_Binary_Version": "9.97.1482356336",
44 "Operating_System": "Mac OS X 10.12.3"
45 }
46 ]
47 }
48}
Of course you'd get them by the Name then :) just removed those parts for privacy reasons
Hi,
unfortunately checking the computer API is not helping too much the devices show up in the Pre-enrollment section even before they have a computer name assigned.
As we have an external CMDB we would like to allow registration of macs only if the serial is already assigned to JAMF DEP.
This would avoid people to register their own mac in our CMDB.
I think that currently such an API is still not available in JAMF.