Export information via API

MrP
Contributor III

I'd like to export the FileVault2 recovery keys and iOS device Activation Lock Bypass Codes programmatically on a scheduled basis. I know the JSS has an API where stuff like this can be done. Has anyone done anything similar, before I go re-inventing the wheel?

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor II

You cannot export the FV2 keys unfortunately. They are stored in encrypted fields in the db and can't be accessed with the API. They don't show up in the computer records or anywhere else in the API.
As an aside, if you would like to be able to report and/or export those keys, please vote up this feature request from yours truly from several years ago. It hasn't gotten any real attention to my knowledge. I'm still waiting for Jamf to help us with that.

I'm not sure about the iOS activation lock bypass codes. They may be in there, but I have not looked.

View solution in original post

4 REPLIES 4

Asnyder
Contributor III

I believe you could use curl to get the extension attribute (if that's how you're getting it) and maybe use a while loop to cycle through device id's. I'm not the best at scripting but I'll edit this when I have something together that I think will work. You can also check yourjss:8443/api to see api options.

mm2270
Legendary Contributor II

You cannot export the FV2 keys unfortunately. They are stored in encrypted fields in the db and can't be accessed with the API. They don't show up in the computer records or anywhere else in the API.
As an aside, if you would like to be able to report and/or export those keys, please vote up this feature request from yours truly from several years ago. It hasn't gotten any real attention to my knowledge. I'm still waiting for Jamf to help us with that.

I'm not sure about the iOS activation lock bypass codes. They may be in there, but I have not looked.

View solution in original post

MrP
Contributor III

@mm2270 Voted up. Thanks!

mm2270
Legendary Contributor II

@MrP No problem. Thanks for voting it up and adding a comment. I may drop another comment on there again myself soon to keep bringing it some attention.

As for the API, it's totally possible to get a lot of other info out of it, just not those FileVault Recovery keys. If there's other stuff you were looking to get from it, post back and I'm sure we can help with a script to pull the data.