Module: Parse::API::Server

Included in:
Client
Defined in:
lib/parse/api/server.rb

Overview

APIs related to the open source Parse Server.

Constant Summary collapse

DEPRECATED_SERVER_VERSION_BELOW =

Minimum supported Parse Server major version. Below this floor the SDK emits a one-shot deprecation warning per client instance the first time ‘server_info` resolves. The threshold tracks “current major minus two” against Parse Server’s release cadence — Parse Server 9.x is current in 2026, so anything below 7.0 is flagged. Override with ‘PARSE_DEPRECATED_SERVER_VERSION_BELOW=6.0` or silence entirely with `PARSE_SUPPRESS_SERVER_VERSION_WARNING=true`.

"7.0.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#server_infoHash

Fetch and cache information about the Parse server configuration. This hash contains information specifically to the configuration of the running parse server.

Returns:

  • (Hash)

    a hash containing server configuration if available.



11
# File 'lib/parse/api/server.rb', line 11

attr_writer :server_info

Instance Method Details

#server_healthBoolean

Fetches the status of the server based on the health check.

Returns:

  • (Boolean)

    whether the server is ‘OK’.



42
43
44
45
46
# File 'lib/parse/api/server.rb', line 42

def server_health
  opts = { cache: false }
  response = request :get, SERVER_HEALTH_PATH, opts: opts
  response.success?
end

#server_info!Hash

Force fetches the server information.

Returns:

  • (Hash)

    a hash containing server configuration if available.



50
51
52
53
54
# File 'lib/parse/api/server.rb', line 50

def server_info!
  @server_info = nil
  @server_version_warned = false
  server_info
end

#server_versionString

Returns the version of the Parse server the client is connected to.

Returns:

  • (String)

    a version string (ex. ‘2.2.25’) if available.



58
59
60
# File 'lib/parse/api/server.rb', line 58

def server_version
  server_info.present? ? @server_info[:parseServerVersion] : nil
end