PixarAnimationStudios / ruby-jss

ruby-jss provides native ruby access to the REST APIs of Jamf Pro, an enterprise/education tool for managing Apple devices, from jamf.com. The Jamf module provides access to both APIs. Jamf Pro objects are implemented as classes and interact with each other. Authentication tokens, data format and other details are handled under the hood to allow simpler, intuitive automation of Jamf-related tasks.
http://pixaranimationstudios.github.io/jss-api-gem/index.html
Other
98 stars 28 forks source link

fix: Send mandatory field 'name' with a MobileDeviceApplication request #93

Closed yanniks closed 1 year ago

yanniks commented 1 year ago

With Jamf Pro 10.45.0, it is currently not possible to create a new MobileDeviceApplication using this API implementation.

If a new application is about to be created, the following exception is thrown:

/Users/user/.gem/ruby/2.6.0/gems/ruby-jss-2.1.1/lib/jamf/api/connection/classic_api.rb:290:in `handle_classic_http_error': [!] MobileDeviceApp name is required (Jamf::ConflictError)
from /Users/user/.gem/ruby/2.6.0/gems/ruby-jss-2.1.1/lib/jamf/api/connection/classic_api.rb:112:in `c_post'
from /Users/user/.gem/ruby/2.6.0/gems/ruby-jss-2.1.1/lib/jamf/api/classic/api_objects/creatable.rb:74:in `create_in_jamf'
from /Users/user/.gem/ruby/2.6.0/gems/ruby-jss-2.1.1/lib/jamf/api/classic/base_classes/api_object.rb:1325:in `create'
from /Users/user/.gem/ruby/2.6.0/gems/ruby-jss-2.1.1/lib/jamf/api/classic/api_objects/self_servable.rb:678:in `create'
from /Users/user/.gem/ruby/2.6.0/gems/ruby-jss-2.1.1/lib/jamf/api/classic/base_classes/api_object.rb:1317:in `save'

This PR sets the name field for a MobileDeviceApplication creation request.

glenfarclas17 commented 1 year ago

Thanks for catching this! We're still on 10.43. I'll get this pushed out with a few other pending updates ASAP.