-
Notifications
You must be signed in to change notification settings - Fork 28
Description
I have a backend API that I use to help automate a bunch of stuff - one of which is switching iPads to different prestage enrollments (so I can automate moving them in and out of Shared iPad prestage). It's been working well for a couple years but this morning it's stopped working (I assume something to do with the 11.24.1 JAMF update that was installed this weekend). Basically I'm trying to fetch the prestage and it gives an error.
I've updated my backend so it's on Ruby 3.4.8 and Ruby-JSS 5.0.2 to make sure that I'm working with the newest toolset - it did resolve another error I was seeing in the logs but not this one.
prestage = Jamf::MobileDevicePrestage.fetch displayName: "Default Unassigned"
/usr/local/bundle/gems/ruby-jss-5.0.2/lib/jamf/api/jamf_pro/mixins/jpapi_resource.rb:69:in 'Jamf::JPAPIResource::ClassMethods#new': Use .fetch, .create, or .all(instantiate:true) to instantiate Jamf::JPAPIResource objects (Jamf::UnsupportedError)
from /usr/local/bundle/gems/ruby-jss-5.0.2/lib/jamf/api/jamf_pro/mixins/collection_resource.rb:534:in 'Jamf::CollectionResource::ClassMethods#fetch'
from (irb):9:in '<main>'
from <internal:kernel>:168:in 'Kernel#loop'
from /usr/local/bundle/gems/padrino-core-0.16.0/lib/padrino-core/cli/base.rb:44:in 'Padrino::Cli::Base#console'
from /usr/local/bundle/gems/thor-1.3.2/lib/thor/command.rb:28:in 'Thor::Command#run'
from /usr/local/bundle/gems/thor-1.3.2/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
from /usr/local/bundle/gems/thor-1.3.2/lib/thor.rb:538:in 'Thor.dispatch'
from /usr/local/bundle/gems/thor-1.3.2/lib/thor/base.rb:584:in 'Thor::Base::ClassMethods#start'
from /usr/local/bundle/gems/padrino-core-0.16.0/bin/padrino:9:in '<top (required)>'
from /app/bin/padrino:29:in 'Kernel#load'
If I just do a Jamf::MobileDevicePrestage.all that part works ok, so it seems it's something to do specifically with the fetch command.