Method: Jamf::MDM::ClassMethods#clear_passcode

Defined in:
lib/jamf/api/classic/api_objects/mdm.rb

#clear_passcode(targets, api: nil, cnx: Jamf.cnx) ⇒ Hash{Integer=>String}

Send an clear_passcode command to one or more targets

Parameters:

  • targets (String, Integer, Array<String,Integer>)

    @see .send_mdm_command

  • cnx (Jamf::Connection) (defaults to: Jamf.cnx)

    the API thru which to send the command

Returns:

  • (Hash{Integer=>String})

    Keys are the target device ids. Values depend on the kind of target:

    • Computers will have the udid of the command sent to that computer. The udid can be used to later retrieve info about the command.

    • Mobile Devices seem to only have one command udid returned - for the last device to have the command sent to it. (even in the Database, not just in the API). So instead, the Hash value is the status of the command for that device, most often ‘Command sent’

    Blank pushes do not generate return values, so Hash values are always ‘Command sent’ (an error will be raised if there are problems sending)



746
747
748
749
750
# File 'lib/jamf/api/classic/api_objects/mdm.rb', line 746

def clear_passcode(targets, api: nil, cnx: Jamf.cnx)
  cnx = api if api

  send_mdm_command targets, :clear_passcode, cnx: cnx
end