Method: JSS::APIObject.all_ids

Defined in:
lib/jss/api_object.rb

.all_ids(refresh = false, api: JSS.api) ⇒ Array<Integer>

Returns an Array of the JSS id numbers of all the members of the subclass.

e.g. When called from subclass JSS::Computer, returns the id's of all computers in the JSS

Parameters:

  • refresh (Boolean) (defaults to: false)

    should the data be re-queried from the API?

  • api (JSS::APIConnection) (defaults to: JSS.api)

    an API connection to use for the query. Defaults to the corrently active API. See JSS::APIConnection

Returns:

  • (Array<Integer>)

    the ids of all it1ems of this subclass in the JSS



188
189
190
# File 'lib/jss/api_object.rb', line 188

def self.all_ids(refresh = false, api: JSS.api)
  all(refresh, api: api).map { |i| i[:id] }
end