Harness Feature Flags API
APIs to create and manage Feature Flags
Operations 8
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
GET
/cf/admin/features
List feature flags in a project · Returns all Feature Flags for the project
#
Ask an LLM
“What feature flags exist in my Harness project?”
“Can I list only the flags that are enabled in one environment?”
Tell an agent
List all feature flags in project {project} of org {org}.
Show flags in project {project} whose status is {status} in environment {environment}.
Ask an LLM
“How do I create a new boolean feature flag with on and off variations?”
“Can I make a permanent flag rather than a temporary one?”
Tell an agent
Create a {kind} feature flag {name} with identifier {identifier} in project {project}.
Add flag {identifier} serving {defaultOnVariation} when on and {defaultOffVariation} when off.
Ask an LLM
“Can I permanently delete a feature flag that's no longer used?”
“Is there a force option to delete a flag other flags depend on?”
Tell an agent destructive · confirm first
Delete feature flag {identifier} from project {project}.
Force delete flag {identifier} with commit message {commitMsg}.
Ask an LLM
“What variations and default values does a specific feature flag have?”
“Is one flag turned on in a given environment?”
Tell an agent
Show feature flag {identifier} in project {project}.
Get the state of flag {identifier} in environment {environment}.
PATCH
/cf/admin/features/{identifier}
Turn a feature flag on or off or change its rules · Updates a Feature Flag
#
Ask an LLM
“How do I turn a feature flag on in production?”
“Can I schedule a flag change to happen at a later time?”
Tell an agent
Turn flag {identifier} on in environment {environment}.
Apply the instructions {instructions} to flag {identifier} with comment {comment}.
Ask an LLM
“Can I rewrite a flag's name, description and variations in one full update?”
“How do I change the default on and off variations of an existing flag?”
Tell an agent
Replace the definition of flag {identifier} with name {name} and variations {variations}.
Set the default on variation of flag {identifier} to {defaultOnVariation}.
GET
/cf/admin/features/{identifier}/dependants
List flags that depend on a feature flag · Return a list of dependant flags
#
Ask an LLM
“Which other flags use this flag as a prerequisite?”
“Will anything break if I remove a flag that others depend on?”
Tell an agent
List the flags that depend on flag {identifier}.
Show dependants of feature flag {identifier} in project {project}.
POST
/cf/admin/features/{identifier}/restore
Restore an archived feature flag · Restore a Feature Flag
#
Ask an LLM
“Can I bring back a feature flag that was archived?”
“Is it possible to undo archiving a flag?”
Tell an agent
Restore archived feature flag {identifier}.
Unarchive flag {identifier} in project {project} with commit message {commitMsg}.
Documentation
Documentation
https://apidocs.harness.io
APIReference
https://apidocs.harness.io
GettingStarted
https://developer.harness.io/docs/platform/automation/api/api-quickstart/
Authentication
https://artifacts.apis.io/harness/authentication/harness-authentication.yml
RateLimits
https://artifacts.apis.io/harness/rate-limits/harness-rate-limits.yml
Specifications
Other Resources
OAuthScopes
https://artifacts.apis.io/harness/scopes/harness-scopes.yml
ErrorCatalog
https://artifacts.apis.io/harness/errors/harness-error-codes.yml
Conventions
https://artifacts.apis.io/harness/conventions/harness-conventions.yml
Idempotency
https://artifacts.apis.io/harness/conventions/harness-conventions.yml