Backend SDK reference

5 minute read

CloudBees Unify Feature Management SDKs for backend services provide server-side integration for Java, Python, Go, .NET, Node.js, PHP, Ruby, and C/C++ applications. Use this reference when implementing feature flags in backend services, APIs, and server-side applications.

Each reference covers SDK version 6.x. Refer to the CloudBees Unify changelog for version-specific differences.

Java SDK methods

The Java SDK provides the Rox class as the main interface for feature flag management in Java server applications and Spring Boot services.

Initialize the Java SDK (setup)

This method configures the SDK with your application key and establishes connection to CloudBees Unify for Java applications.

static Future<CoreState> setup(String appKey) static Future<CoreState> setup(String appKey, RoxOptions options)

Configures the SDK to work with the provided application key and retrieves feature flag configuration. Returns Future<CoreState> that completes when SDK has retrieved data from CloudBees Unify.

Parameter Type Description

appKey

String

Environment-specific SDK key from CloudBees Unify.

options

RoxOptions

Configuration instance with desired SDK settings.

Register flag containers (register)

This method registers container instances to make flags available for configuration in the CloudBees Unify UI.

static void register(String namespace, RoxContainer container)

Registers a container instance containing flag definitions with CloudBees Unify. Container public members become flags in the UI named with the object name.

Shut down the Java SDK (shutdown)

This method performs graceful shutdown of the SDK and cleans all background tasks.

static void shutdown()

Closes and cleans all background tasks and threads. Call only when SDK is successfully set up. Can call setup again after shutdown.

Python SDK methods

The Python SDK provides the Rox class as the main interface for feature flag management in Python server applications and Django services.

Initialize the Python SDK (setup)

This method configures the SDK with your application key and establishes connection to CloudBees Unify for Python applications.

Rox.setup(apiKey) Rox.setup(apiKey, options)

Configures the SDK to work with the provided application and retrieves feature flag configuration. Returns a Future object representing the execution when SDK loads configuration from network.

Parameter Type Description

apiKey

string

Environment-specific SDK key from CloudBees Unify.

options

RoxOptions

Configuration instance with desired SDK settings.

Register flag containers (register)

This method registers container instances to make Python flags available for configuration.

Rox.register(container) Rox.register(namespace, container)

Registers a feature flag container with the Rox client for Python applications. Public member variables become flags in the UI named with the object name.

Shut down the Python SDK (shutdown)

This method performs graceful shutdown of the Python SDK and cleans background processes.

Rox.shutdown()

Closes and cleans all background tasks and threads. Use only when SDK is set up successfully.

Go SDK methods

The Go SDK provides the Rox type as the main interface for feature flag management in Go server applications and microservices.

Initialize the Go SDK (Setup)

This method configures the SDK with your application key and establishes connection to CloudBees Unify for Go applications.

Setup(appKey string, roxOptions model.RoxOptions) <-chan error

Configures the SDK to work with the provided application and communicates with server for flag values. Returns channel that indicates when SDK has received configuration from CloudBees Unify.

Parameter Type Description

appKey

string

Environment-specific SDK key from CloudBees Unify.

roxOptions

RoxOptions

Configuration instance with desired SDK settings.

Register flag containers (Register)

This method registers container instances to make Go flags available for configuration.

Register(namespace string, roxContainer interface{}) RegisterWithEmptyNamespace(roxContainer interface{})

Registers a feature flag container with the Rox client for Go applications. Public member variables become flags in the UI named with the object name.

Shut down the Go SDK (Shutdown)

This method performs graceful shutdown of the Go SDK and cleans background goroutines.

Shutdown() <-chan error

Closes and cleans all background tasks and threads. Use only when SDK is set up successfully.

.NET SDK methods

The .NET SDK provides the Rox class as the main interface for feature flag management in .NET server applications and ASP.NET services.

Initialize the .NET SDK (Setup)

This method configures the SDK with your application key and establishes connection to CloudBees Unify for .NET applications.

static Task<RoxSetupResult> Setup(string apiKey) static Task<RoxSetupResult> Setup(string apiKey, RoxOptions roxOptions)

Configures the SDK to work with the provided application and retrieves feature flag configuration. Returns task that completes when SDK has retrieved data from CloudBees Unify.

Parameter Type Description

apiKey

string

Environment-specific SDK key from CloudBees Unify.

roxOptions

RoxOptions

Configuration instance with desired SDK settings.

Register flag containers (Register)

This method registers container instances to make .NET flags available for configuration.

static void Register(string nameSpace, object container)

Registers a feature flag container with the Rox client for .NET applications. Container properties become flags in the UI named with the object name.

Shut down the .NET SDK (Shutdown)

This method performs graceful shutdown of the .NET SDK and cleans background tasks.

static void Shutdown()

Closes and cleans all background tasks and threads. Use only when SDK is set up successfully.

Node.js SDK methods

The Node.js SDK provides the Rox object as the main interface for feature flag management in Node.js server applications and Express services.

Initialize the Node.js SDK (setup)

This method configures the SDK with your application key and establishes connection to CloudBees Unify for Node.js server applications.

Rox.setup(appKey, options)

Configures the SDK for Node.js server operation and retrieves feature flag configuration. Returns promise that resolves when configuration is retrieved from CloudBees Unify.

Register flag containers (register)

This method registers container instances to make Node.js server flags available for configuration.

Rox.register(namespace, container)

Registers flag container containing Flag, RoxString, and RoxNumber objects for server-side evaluation. Container flags become available for configuration in the CloudBees Unify UI.

Node.js server flag types

Flag types available for Node.js server-side applications with different data types and evaluation patterns.

Rox.Flag (server-side boolean flags)

Server-side boolean flags for backend feature switches and API behavior control.

new Rox.Flag(defaultValue)

Creates boolean flag for server-side evaluation in Node.js applications.

Rox.RoxString (server-side string flags)

Server-side string flags for configuration values and API response content.

new Rox.RoxString(defaultValue, variations)

Creates string flag with predefined variations for server-side content control.

PHP SDK methods

The PHP SDK provides server-side feature flag management for PHP applications and Laravel services.

Initialize the PHP SDK

This method configures the SDK with your application key for PHP server applications.

Establishes connection to CloudBees Unify and retrieves feature flag configuration for PHP backend services. Supports both procedural and object-oriented PHP development patterns.

Register flag containers

This method registers flag containers to make PHP flags available for server-side evaluation.

Registers container instances containing flag definitions for PHP applications. Enables flag configuration through CloudBees Unify UI for server-rendered content.

Ruby SDK methods

The Ruby SDK provides server-side feature flag management for Ruby applications and Rails services.

Initialize the Ruby SDK

This method configures the SDK with your application key for Ruby server applications.

Establishes connection to CloudBees Unify and retrieves feature flag configuration for Ruby backend services. Supports both Rails applications and standalone Ruby services.

Register flag containers

This method registers flag containers to make Ruby flags available for server-side evaluation.

Registers container instances containing flag definitions for Ruby applications. Enables flag configuration through CloudBees Unify UI for server-side functionality.

C/C++ server SDK methods

The C/C++ server SDKs provide low-level feature flag management for high-performance backend services and system applications.

Initialize the C/C++ server SDK

This method configures the SDK with your application key for C/C++ server applications.

Establishes connection to CloudBees Unify and retrieves feature flag configuration for native backend services. Optimized for high-performance server applications and system-level services.

Register flag containers

This method registers flag containers to make C/C++ flags available for server-side evaluation.

Registers container instances containing flag definitions for native applications. Enables flag configuration through CloudBees Unify UI for system-level functionality.

Common server-side flag patterns

Backend SDKs support common patterns for server-side feature flag implementation across all supported languages.

Request-scoped evaluation

Server-side flags can be evaluated with request-specific context for personalized responses.

Context properties enable sophisticated targeting based on user attributes, request headers, and application state. Evaluation occurs for each request with current configuration and targeting rules.

Configuration caching

Backend SDKs cache flag configuration to minimize network requests and ensure high performance.

Configuration updates are fetched periodically or triggered manually for near real-time flag changes. Local caching ensures continued operation even with temporary network issues.

Async initialization

Server SDKs support asynchronous initialization to prevent blocking application startup.

Setup methods return promises, futures, or channels depending on language patterns. Applications can continue initialization while flag configuration loads in background.

Server SDK configuration options

Configuration options control backend SDK behavior across all supported server-side languages.

Logging and debugging

Server SDKs provide configurable logging levels for monitoring and troubleshooting.

Debug logging enables detailed inspection of flag evaluation, network requests, and configuration updates. Production logging focuses on errors and critical events without performance impact.

Network configuration

Backend SDKs support proxy configuration and custom network settings for enterprise environments.

Proxy support enables deployment in corporate networks with restricted internet access. Custom timeouts and retry logic ensure reliable operation in various network conditions.

Performance tuning

Server SDKs offer configuration options for optimizing performance in high-throughput environments.

Fetch interval controls how frequently configuration updates are retrieved from CloudBees Unify. Caching strategies balance freshness with performance for different application requirements.