{ "info": { "_postman_id": "fm-api-collection", "name": "CloudBees Feature Management API", "description": "API collection for CloudBees Feature Management.\n\nBefore using this collection:\n1. Set up an environment with `baseUrl`, `applicationId`, and `apiToken` variables\n2. Configure Bearer token authentication at the collection level", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{apiToken}}", "type": "string" } ] }, "variable": [ { "key": "baseUrl", "value": "https://api.cloudbees.io", "type": "string" }, { "key": "applicationId", "value": "", "type": "string" }, { "key": "apiToken", "value": "", "type": "string" } ], "item": [ { "name": "Flags", "item": [ { "name": "List flags", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags"] }, "description": "Retrieves all flags for an application." } }, { "name": "Create flag", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"default.newFeature\",\n \"description\": \"My new feature flag\",\n \"flagType\": \"Boolean\",\n \"labels\": [\"frontend\"]\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags"] }, "description": "Creates a new feature flag." } }, { "name": "Get flag by ID", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}"] }, "description": "Retrieves a specific flag by its ID." } }, { "name": "Get flag by name", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/by-name/{{flagName}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "by-name", "{{flagName}}"] }, "description": "Retrieves a specific flag by its name." } }, { "name": "Update flag", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"default.newFeature\",\n \"description\": \"Updated description\",\n \"labels\": [\"frontend\", \"updated\"]\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}"] }, "description": "Updates an existing flag's metadata." } }, { "name": "Delete flag", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}"] }, "description": "Deletes a feature flag. This action cannot be undone." } }, { "name": "Restore deleted flag", "request": { "method": "POST", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagName}}/restore", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagName}}", "restore"] }, "description": "Restores a previously deleted flag." } }, { "name": "List labels", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/labels", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "labels"] }, "description": "Retrieves all unique labels used across flags." } }, { "name": "Get flag configuration state", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration-state", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration-state"] }, "description": "Retrieves the configuration state for a flag across environments." } }, { "name": "Get flag usage per environment", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/flag-usage-per-environment", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "flag-usage-per-environment"] }, "description": "Retrieves usage statistics for a flag across environments." } } ], "description": "Endpoints for managing feature flags." }, { "name": "Flag Configurations", "item": [ { "name": "Get flag configuration", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}"] }, "description": "Retrieves the configuration for a flag in a specific environment." } }, { "name": "Update flag configuration", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"enabled\": true,\n \"defaultValue\": false,\n \"conditions\": [\n {\n \"group\": {\n \"name\": \"BetaUsers\"\n },\n \"value\": true\n }\n ],\n \"stickinessProperty\": \"user_id\"\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}"] }, "description": "Updates the complete configuration for a flag in a specific environment." } }, { "name": "Patch flag configuration", "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"enabled\": false\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}"] }, "description": "Partially updates a flag configuration. Only specified fields are updated." } }, { "name": "Update configuration state", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"enabled\": true\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}/configstate", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}", "configstate"] }, "description": "Enables or disables a flag in an environment without modifying other settings." } }, { "name": "Clone flag configuration", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"targetEnvironmentId\": \"{{targetEnvironmentId}}\"\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/environment/{{environmentId}}/clone", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "environment", "{{environmentId}}", "clone"] }, "description": "Copies a flag configuration from one environment to another." } }, { "name": "List flag configurations", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/environments/{{environmentId}}/flag-configurations", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "environments", "{{environmentId}}", "flag-configurations"] }, "description": "Retrieves configurations for all flags in an environment." } } ], "description": "Endpoints for managing flag configurations per environment." }, { "name": "Target Groups", "item": [ { "name": "List target groups", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups"] }, "description": "Retrieves all target groups for an application." } }, { "name": "Create target group", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"PremiumUsers\",\n \"description\": \"Users with premium subscription\",\n \"conditions\": {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"property\": \"subscription_plan\",\n \"operator\": \"in-array\",\n \"operand\": [\"premium\", \"enterprise\"]\n }\n ]\n }\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups"] }, "description": "Creates a new target group." } }, { "name": "Get target group by ID", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}"] }, "description": "Retrieves a specific target group by its ID." } }, { "name": "Get target group by name", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/by-name/{{targetGroupName}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups", "by-name", "{{targetGroupName}}"] }, "description": "Retrieves a specific target group by its name." } }, { "name": "Update target group", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"PremiumUsers\",\n \"description\": \"Updated description\",\n \"conditions\": {\n \"operator\": \"or\",\n \"conditions\": [\n {\n \"property\": \"subscription_plan\",\n \"operator\": \"eq\",\n \"operand\": \"premium\"\n },\n {\n \"property\": \"subscription_plan\",\n \"operator\": \"eq\",\n \"operand\": \"enterprise\"\n }\n ]\n }\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}"] }, "description": "Updates an existing target group." } }, { "name": "Delete target group", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}"] }, "description": "Deletes a target group. This action cannot be undone." } }, { "name": "List target groups with flag usage", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/with-flags-usage", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups", "with-flags-usage"] }, "description": "Retrieves all target groups along with the flags that use them." } }, { "name": "Get target group flag usage per environment", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}/flag-usage-per-environment", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}", "flag-usage-per-environment"] }, "description": "Retrieves flag usage statistics for a target group across environments." } } ], "description": "Endpoints for managing target groups." }, { "name": "Custom Properties", "item": [ { "name": "List custom properties", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties"] }, "description": "Retrieves all custom properties for an application." } }, { "name": "Create custom property", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"account_tier\",\n \"type\": \"String\",\n \"description\": \"User account tier (free, pro, enterprise)\"\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties"] }, "description": "Creates a new custom property." } }, { "name": "Get custom property by ID", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}"] }, "description": "Retrieves a specific custom property by its ID." } }, { "name": "Get custom property by name", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/by-name/{{propertyName}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties", "by-name", "{{propertyName}}"] }, "description": "Retrieves a specific custom property by its name." } }, { "name": "Update custom property", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"account_tier\",\n \"type\": \"String\",\n \"description\": \"Updated description for account tier\"\n}" }, "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}"] }, "description": "Updates an existing custom property." } }, { "name": "Delete custom property", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}"] }, "description": "Deletes a custom property. This action cannot be undone." } }, { "name": "Get property flag usage per environment", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}/flag-usage-per-environment", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}", "flag-usage-per-environment"] }, "description": "Retrieves which flags use this property, organized by environment." } }, { "name": "Get property target group usage", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}/target-group-usage", "host": ["{{baseUrl}}"], "path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}", "target-group-usage"] }, "description": "Retrieves which target groups use this property." } } ], "description": "Endpoints for managing custom properties." } ] }