Flagsmith Feature states API
Manage feature states and feature versioning.
Operations 17
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
/api/v1/environment-feature-versions/{id}/
Get an environment feature version by ID · Api v1 environment feature versions retrieve
#
Ask an LLM
“Can I look up a feature version without knowing its environment or feature?”
“What does a specific environment feature version contain?”
Tell an agent
Fetch environment feature version {id} directly by its ID.
Show me the details of feature version {id}.
GET
/api/v1/environments/{environment_api_key}/featurestates/
List feature states in an environment · Api v1 environments featurestates list
#
Ask an LLM
“How do I see every flag state set in one environment using its environment key?”
“Can I filter an environment's feature states by feature name?”
Tell an agent
List the feature states in environment {environment_api_key}.
Show the feature states for feature named {feature_name} in environment {environment_api_key}.
POST
/api/v1/environments/{environment_api_key}/featurestates/
Create a feature state via the deprecated environment path · Api v1 environments featurestates create
#
Ask an LLM
“Is there still an environment-scoped endpoint for creating feature states, even though it is deprecated?”
“How did older integrations add a feature state under an environment API key?”
Tell an agent
Using the deprecated environment-scoped endpoint, create a feature state for feature {feature} in environment {environment_api_key}.
Via the legacy environment path, add an enabled state {enabled} for feature {feature} in environment {environment_api_key}.
GET
/api/v1/environments/{environment_api_key}/featurestates/{id}/
Get one feature state in an environment · Api v1 environments featurestates retrieve
#
Ask an LLM
“How do I read a single feature state inside an environment by its ID?”
“What value and enabled status does a given feature state have in this environment?”
Tell an agent
Get feature state {id} in environment {environment_api_key}.
Show whether feature state {id} is enabled in environment {environment_api_key}.
PATCH
/api/v1/environments/{environment_api_key}/featurestates/{id}/
Toggle a feature state in an environment · Api v1 environments featurestates partial update
#
Ask an LLM
“How do I switch a flag on or off in an environment using its environment key?”
“Can I flip the enabled status of one feature state under an environment?”
Tell an agent
Set feature state {id} in environment {environment_api_key} to enabled {enabled}.
Turn off feature state {id} in environment {environment_api_key}.
DELETE
/api/v1/environments/{environment_api_key}/featurestates/{id}/
Delete a feature state from an environment · Api v1 environments featurestates destroy
#
Ask an LLM
“How do I remove a feature state from an environment by its environment key?”
“Can I delete a single feature state that is scoped to an environment?”
Tell an agent destructive · confirm first
Delete feature state {id} from environment {environment_api_key}.
Remove the environment feature state {id} under key {environment_api_key}.
PATCH
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/{environment_feature_version_pk}/featurestates/{id}/
Edit a feature state inside a feature version · Api v1 environments features versions featurestates partial update
#
Ask an LLM
“How do I change the value of a feature state within a versioned feature change?”
“Can I enable a flag inside a draft version before publishing it?”
Tell an agent
In version {environment_feature_version_pk} of feature {feature_pk} in environment {environment_pk}, set state {id} value to {feature_state_value}.
Enable state {id} in feature {feature_pk} version {environment_feature_version_pk} for environment {environment_pk}.
DELETE
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/{environment_feature_version_pk}/featurestates/{id}/
Delete a feature state from a feature version · Api v1 environments features versions featurestates destroy
#
Ask an LLM
“How do I remove a feature state from a specific versioned change of a feature?”
“Can I delete a segment or override state inside a draft feature version?”
Tell an agent destructive · confirm first
Delete feature state {id} from version {environment_feature_version_pk} of feature {feature_pk} in environment {environment_pk}.
Remove state {id} from feature {feature_pk}'s version {environment_feature_version_pk} in environment {environment_pk}.
POST
/api/v1/feature-health/{path}
Send a feature health event from a provider · Api v1 feature health create
#
Ask an LLM
“How does a monitoring provider report feature health events to Flagsmith?”
“Where do feature health webhooks from a provider get posted?”
Tell an agent
Post a feature health event to the provider webhook path {path}.
Report a health signal for a feature through feature health endpoint {path}.
GET
/api/v1/features/featurestates/
List feature states filtered by environment · Api v1 features featurestates list
#
Ask an LLM
“How do I list feature states for an environment by its numeric ID rather than its key?”
“Can I filter feature states to one feature segment?”
Tell an agent
List feature states for environment ID {environment}.
Show feature states for feature {feature} in environment ID {environment}.
POST
/api/v1/features/featurestates/
Create a feature state · Api v1 features featurestates create
#
Ask an LLM
“What is the current way to create a feature state for a feature in an environment?”
“Can I create a feature state that goes live from a future date?”
Tell an agent
Create a feature state for feature {feature} in environment {environment}.
Add a feature state for feature {feature} in environment {environment} with value {feature_state_value}, live from {live_from}.
PATCH
/api/v1/features/featurestates/{id}/
Update a feature state by ID · Api v1 features featurestates partial update
#
Ask an LLM
“How do I change a feature state's value when I only have its ID?”
“Can I update the multivariate values on an existing feature state?”
Tell an agent
Change the value of feature state {id} to {feature_state_value}.
Update feature state {id} so its enabled flag is {enabled}.
GET
/api/v1/features/featurestates/get-by-uuid/{uuid}/
Get a feature state by UUID · Api v1 features featurestates get by uuid retrieve
#
Ask an LLM
“Can I look up a feature state using its UUID instead of its numeric ID?”
“What feature state does this UUID refer to?”
Tell an agent
Get the feature state with UUID {uuid}.
Resolve feature state UUID {uuid} to its details.
POST
/api/v1/projects/{project_pk}/feature-health/events/{id}/dismiss/
Dismiss a feature health event · Api v1 projects feature health events dismiss create
#
Ask an LLM
“How do I dismiss a feature health alert that is no longer relevant?”
“Can I give a reason when dismissing a feature health event?”
Tell an agent
Dismiss feature health event {id} in project {project_pk} with reason {reason}.
Clear health alert {id} for project {project_pk}, noting {reason}.
GET
/api/v1/projects/{project_pk}/feature-health/providers/
List a project's feature health providers · Api v1 projects feature health providers list
#
Ask an LLM
“Which feature health providers are connected to my project?”
“What monitoring sources feed feature health for a project?”
Tell an agent
List the feature health providers for project {project_pk}.
Show which health monitoring providers project {project_pk} uses.
POST
/api/v1/projects/{project_pk}/feature-health/providers/
Add a feature health provider to a project · Api v1 projects feature health providers create
#
Ask an LLM
“How do I connect a feature health provider to a project?”
“Can I register a new monitoring source for feature health?”
Tell an agent
Add feature health provider {name} to project {project_pk}.
Connect the {name} health provider for project {project_pk}.
DELETE
/api/v1/projects/{project_pk}/feature-health/providers/{name}/
Remove a feature health provider from a project · Api v1 projects feature health providers destroy
#
Ask an LLM
“How do I disconnect a feature health provider from my project?”
“Can I stop a monitoring source from reporting feature health?”
Tell an agent destructive · confirm first
Remove feature health provider {name} from project {project_pk}.
Disconnect the {name} health provider in project {project_pk}.