lib/jamf/api/mixins/bulk_deletable.rb
def bulk_delete(ids, cnx: Jamf.cnx)
      ids = [ids] unless ids.is_a? Array
      request_body = { ids: ids.map(&:to_s) }

      begin
        cnx.post "#{rsrc_path}/#{DELETE_MULTIPLE_ENDPOINT}", request_body
        []
      rescue Jamf::Connection::APIError => e
        raise e unless e.httpStatus == 400

        e.errors
      end
    end
# Delete multiple objects by providing an array of their
#
# @param ids [Array<String,Integer>] The ids to delete
#
# @param cnx [Jamf::Connection] The connection to use, default: Jamf.cnx
#
# @return [Array<Jamf::Connection::APIError::ErrorInfo] Info about any ids
#   that failed to be deleted.
#
Delete multiple objects by providing an array of their
Delete multiple objects by providing an array of their
def bulk_delete(ids, cnx: Jamf.cnx)
      ids = [ids] unless ids.is_a? Array
      request_body = { ids: ids.map(&:to_s) }
      begin
        cnx.post "#{rsrc_path}/#{DELETE_MULTIPLE_ENDPOINT}", request_body
        []
      rescue Jamf::Connection::APIError => e
        raise e unless e.httpStatus == 400
        e.errors
      end
    end
def bulk_delete ( ids , cnx : Jamf . cnx ) ids = [ ids ] unless ids . is_a? Array request_body = { ids : ids . map ( & :to_s ) } begin cnx . post "#{rsrc_path}/#{DELETE_MULTIPLE_ENDPOINT}" , request_body [ ] rescue Jamf :: Connection :: APIError => e raise e unless e . httpStatus == 400 e . errors end end
Delete multiple objects by providing an array of their
Delete multiple objects by providing an array of their
Info about any ids that failed to be deleted.
Info about any ids that failed to be deleted .
Array<Jamf::Connection::APIError::ErrorInfo
ids
The ids to delete
The ids to delete
cnx
The connection to use, default: Jamf.cnx
The connection to use default : Jamf . cnx