Skip to main content
Question

List DEP computers by API


geoffreykobrien
Forum|alt.badge.img+9

Does anyone know how to list machines that show in the DEP screen in the JSS from an API call? Im not seeing an option, but wanted to double check.

4 replies

Forum|alt.badge.img+7
  • Contributor
  • 43 replies
  • May 23, 2016

Try adding a "Saved Search" and pull that one via API.


Forum|alt.badge.img+5
  • Contributor
  • 12 replies
  • February 9, 2017

Were you ever able to solve this? We would like to do the same thing.


Forum|alt.badge.img+7
  • Contributor
  • 43 replies
  • February 10, 2017

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


Forum|alt.badge.img+3
  • New Contributor
  • 5 replies
  • November 24, 2017

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings