Method: OryClient::IdentityApi#list_identities_with_http_info

Defined in:
lib/ory-client/api/identity_api.rb

#list_identities_with_http_info(opts = {}) ⇒ Array<(Array<Identity>, Integer, Hash)>

List Identities Lists all [identities](www.ory.sh/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Deprecated Items per Page DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future. This is the number of items per page. (default to 250)

  • :page (Integer)

    Deprecated Pagination Page DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.

  • :page_size (Integer)

    Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to ‘1’)

  • :consistency (String)

    Read Consistency Level (preview) The read consistency level determines the consistency guarantee for reads: strong (slow): The read is guaranteed to return the most recent data committed at the start of the read. eventual (very fast): The result will return data that is about 4.8 seconds old. The default consistency guarantee can be changed in the Ory Network Console or using the Ory CLI with &#x60;ory patch project –replace &#39;/previews/default_read_consistency_level&#x3D;&quot;strong&quot;&#39;&#x60;. Setting the default consistency level to &#x60;eventual&#x60; may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting: &#x60;GET /admin/identities&#x60; This feature is in preview and only available in Ory Network. ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level. strong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level. eventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps.

  • :ids (Array<String>)

    Retrieve multiple identities by their IDs. This parameter has the following limitations: Duplicate or non-existent IDs are ignored. The order of returned IDs may be different from the request. This filter does not support pagination. You must implement your own pagination as the maximum number of items returned by this endpoint may not exceed a certain threshold (currently 500).

  • :credentials_identifier (String)

    CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.

  • :preview_credentials_identifier_similar (String)

    This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.

  • :include_credential (Array<String>)

    Include Credentials in Response Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available.

  • :organization_id (String)

    List identities that belong to a specific organization.

Returns:

  • (Array<(Array<Identity>, Integer, Hash)>)

    Array<Identity> data, response status code and response headers



846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
# File 'lib/ory-client/api/identity_api.rb', line 846

def list_identities_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IdentityApi.list_identities ...'
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling IdentityApi.list_identities, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling IdentityApi.list_identities, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IdentityApi.list_identities, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IdentityApi.list_identities, must be greater than or equal to 1.'
  end

  allowable_values = ["", "strong", "eventual"]
  if @api_client.config.client_side_validation && opts[:'consistency'] && !allowable_values.include?(opts[:'consistency'])
    fail ArgumentError, "invalid value for \"consistency\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/admin/identities'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
  query_params[:'consistency'] = opts[:'consistency'] if !opts[:'consistency'].nil?
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
  query_params[:'credentials_identifier'] = opts[:'credentials_identifier'] if !opts[:'credentials_identifier'].nil?
  query_params[:'preview_credentials_identifier_similar'] = opts[:'preview_credentials_identifier_similar'] if !opts[:'preview_credentials_identifier_similar'].nil?
  query_params[:'include_credential'] = @api_client.build_collection_param(opts[:'include_credential'], :multi) if !opts[:'include_credential'].nil?
  query_params[:'organization_id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Identity>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"IdentityApi.list_identities",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IdentityApi#list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end