Powerful REST API to automate your feature flag workflows and integrate with your existing CI/CD pipelines.
Learn how to use our official SDK to evaluate feature flags in your application.
Select your preferred package manager to install the Easy Flags SDK.
npm install @orange-ember/easy-flags-sdk yarn add @orange-ember/easy-flags-sdk pnpm add @orange-ember/easy-flags-sdk Initialize the client and start evaluating flags in your code.
Import and initialize the EasyFlagsClient with your API Key, Space ID, and Environment ID.
import { EasyFlagsClient } from "@orange-ember/easy-flags-sdk";
const client = new EasyFlagsClient({
apiKey: "YOUR_API_KEY",
spaceId: "YOUR_SPACE_ID",
environmentId: "YOUR_ENVIRONMENT_ID",
}); Check if a feature is enabled or get its value using the evaluate method.
const isFeatureEnabled = await client.evaluate("new-navigation", {
defaultValue: false,
});
if (isFeatureEnabled) {
// Render new navigation
} Pass a userId and context for advanced segmentation and deterministic rollouts.
const themeColor = await client.evaluate<string>("user-theme", {
defaultValue: "#ffffff",
userId: "user_789", // Required for deterministic rollouts
context: {
plan: "premium",
version: "2.4.0"
}
}); | Property | Type | Description |
|---|---|---|
| apiKey | string | Your Easy Flags API Key. |
| spaceId | string | The ID of your Space. |
| environmentId | string | The ID of your Environment. |
| cacheTTL | number | Cache TTL in seconds (default: 60). |
| timeout | number | API request timeout in ms (default: 5000). |
/api/auth/login Authenticate a user and get a JWT token.
/api/spaces List all spaces for the authenticated user.
/api/spaces/:spaceId/features Create a new feature in the specified space.
/api/spaces/:spaceId/environments Get all environments in a space.
/api/features/:featureKey/evaluate Evaluate a specific feature flag for a context and environment.
Our API is built for scale. If you have specific needs, reach out to our team.
Contact Support