Operations 54
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
Ask an LLM
“Which Flagsmith environments does my account have access to?”
“Can I narrow the environment list down to a single project?”
Tell an agent
List every environment I have access to.
Show the environments that belong to project {project}.
POST
/api/v1/environments/{environment_api_key}/create-change-request/
Open a change request for flag changes · Create environment feature change request
#
Ask an LLM
“How do I propose a flag change for approval instead of applying it directly?”
“Can a change request bundle several feature state changes in one environment?”
Tell an agent
Open a change request titled {title} in environment {environment_api_key} with these feature state changes: {feature_states}.
Submit a change request in {environment_api_key} called {title} explaining {description}.
GET
/api/v1/environments/{environment_api_key}/experiment-metrics/
List experiment metrics in an environment · List metrics
#
Ask an LLM
“What experiment metrics are defined for this environment?”
“Can I search experiment metrics by name?”
Tell an agent
List the experiment metrics in environment {environment_api_key}.
Find experiment metrics named like {q} in {environment_api_key}.
POST
/api/v1/environments/{environment_api_key}/experiment-metrics/
Define a new experiment metric · Create metric
#
Ask an LLM
“How do I define a metric to measure an experiment against?”
“Can I set whether a metric should go up or down when I create it?”
Tell an agent
Create an experiment metric {name} in {environment_api_key} using event definition {definition}.
Add metric {name} to {environment_api_key} with aggregation {aggregation} and expected direction {direction}, defined by {definition}.
GET
/api/v1/environments/{environment_api_key}/experiment-metrics/{id}/
Get an experiment metric's details · Get metric
#
Ask an LLM
“Which experiments are using a particular metric?”
“What aggregation and event definition does this experiment metric use?”
Tell an agent
Show experiment metric {id} in environment {environment_api_key} and the experiments that use it.
Tell me which experiments use metric {id} in {environment_api_key}.
PUT
/api/v1/environments/{environment_api_key}/experiment-metrics/{id}/
Update an experiment metric · Update metric
#
Ask an LLM
“Can I change the event definition of an existing experiment metric?”
“How would I rename a metric I already created for experiments?”
Tell an agent
Rename experiment metric {id} in {environment_api_key} to {name}, keeping definition {definition}.
Change the expected direction of existing metric {id} in {environment_api_key} to {direction}.
GET
/api/v1/environments/{environment_api_key}/experiments/
List experiments in an environment · List experiments
#
Ask an LLM
“Which experiments are currently running in this environment?”
“Can I filter experiments by status or search by feature name?”
Tell an agent
List the experiments in environment {environment_api_key}.
Show experiments in {environment_api_key} with status {status}.
POST
/api/v1/environments/{environment_api_key}/experiments/
Start an experiment on a multivariate feature · Create experiment
#
Ask an LLM
“How do I set up an A/B experiment on a multivariate flag?”
“Is it possible to run two active experiments on the same feature?”
Tell an agent
Create experiment {name} on feature {feature} in {environment_api_key} with hypothesis {hypothesis}.
Set up an experiment on feature {feature} in {environment_api_key} called {name}, testing {hypothesis}, and attach metrics {metrics}.
GET
/api/v1/environments/{environment_api_key}/experiments/{experiment_id}/
Get an experiment's configuration · Get experiment
#
Ask an LLM
“What metrics and rollout state does this experiment have?”
“Which feature is a given experiment configured against?”
Tell an agent
Show the configuration of experiment {experiment_id} in environment {environment_api_key}.
List the metrics attached to experiment {experiment_id} in {environment_api_key} and its rollout state.
PUT
/api/v1/environments/{environment_api_key}/experiments/{experiment_id}/
Rename an experiment or change its hypothesis · Update experiment
#
Ask an LLM
“Can I reword the hypothesis of an experiment that already exists?”
“How would I rename an experiment after creating it?”
Tell an agent
Rename experiment {experiment_id} in {environment_api_key} to {name}, keeping feature {feature} and hypothesis {hypothesis}.
Change the hypothesis of existing experiment {experiment_id} to {hypothesis}.
GET
/api/v1/environments/{environment_api_key}/experiments/{experiment_id}/exposures/
Get variant exposure counts for an experiment · Get experiment exposures
#
Ask an LLM
“How many users have been exposed to each variant of my experiment?”
“Why would an experiment's exposure counts come back empty?”
Tell an agent
Show the variant exposure counts for experiment {experiment_id} in {environment_api_key}.
Check how many users saw each variant in experiment {experiment_id} ({environment_api_key}).
GET
/api/v1/environments/{environment_api_key}/experiments/{experiment_id}/results/
Get statistical results for an experiment · Get experiment results
#
Ask an LLM
“Is my experiment showing a statistically significant winner yet?”
“What do the metric results look like for a finished experiment?”
Tell an agent
Get the statistical results for experiment {experiment_id} in {environment_api_key}.
Tell me whether experiment {experiment_id} in {environment_api_key} has a winning variant yet.
POST
/api/v1/environments/{environment_api_key}/features/{feature_pk}/create-segment-override/
Add a segment override to a feature in one call · Create segment override
#
Ask an LLM
“How do I give a segment a different flag value in a single request?”
“Can I bind a segment and set its override value at the same time?”
Tell an agent
Override feature {feature_pk} in {environment_api_key} for segment {feature_segment} with value {feature_state_value}.
Create a segment override on feature {feature_pk} in {environment_api_key} that sets enabled to {enabled} and value {feature_state_value}.
PUT
/api/v1/environments/{environment_api_key}/featurestates/{id}/
Update a feature state in an unversioned environment · Update environment feature state
#
Ask an LLM
“How do I turn a flag on in an environment that doesn't use v2 feature versioning?”
“Can I change a flag's value in an environment scoped by its API key?”
Tell an agent
In environment {environment_api_key}, set feature state {id} for feature {feature} to enabled {enabled}.
Change the value of feature state {id} in environment {environment_api_key} to {feature_state_value} for feature {feature}.
GET
/api/v1/environments/{environment_api_key}/list-change-requests/
List change requests in an environment · List environment change requests
#
Ask an LLM
“Which change requests are still waiting to be committed in this environment?”
“Can I find change requests that touch a particular feature or segment in one environment?”
Tell an agent
List the change requests for environment {environment_api_key}.
Show uncommitted change requests in {environment_api_key} for feature {feature_id}.
GET
/api/v1/environments/{environment_pk}/feature-lifecycle-counts/
Count features by lifecycle stage · Get feature lifecycle counts
#
Ask an LLM
“How many flags are in each lifecycle stage for this environment?”
“What share of an environment's features are stale or ready to remove?”
Tell an agent
Give me feature counts per lifecycle stage for environment {environment_pk}.
Summarise how many flags in environment {environment_pk} sit in each lifecycle stage.
GET
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/
List versions of a feature in an environment · Get environment feature versions
#
Ask an LLM
“What version history does a flag have in a v2-versioned environment?”
“Can I see past published versions of a feature in one environment?”
Tell an agent
List the versions of feature {feature_pk} in environment {environment_pk}.
Show the version history of flag {feature_pk} for v2-versioned environment {environment_pk}.
POST
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/
Create a new feature version in an environment · Create environment feature version
#
Ask an LLM
“How do I draft a new version of a flag in a v2-versioned environment?”
“Can I create a feature version and publish it immediately?”
Tell an agent
Create a new version of feature {feature_pk} in environment {environment_pk}.
Draft a version of feature {feature_pk} in {environment_pk} described as {description} and publish immediately: {publish_immediately}.
GET
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/{environment_feature_version_pk}/featurestates/
List feature states inside a feature version · Get environment feature version states
#
Ask an LLM
“Which feature states make up a specific feature version?”
“What values did a flag have in a particular version in this environment?”
Tell an agent
Show the feature states in version {environment_feature_version_pk} of feature {feature_pk} in environment {environment_pk}.
List the flag values captured in version {environment_feature_version_pk} for feature {feature_pk}, environment {environment_pk}.
POST
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/{environment_feature_version_pk}/featurestates/
Add a feature state to a draft version · Create environment feature version state
#
Ask an LLM
“How do I add a segment override to an unpublished feature version?”
“Can I add a new feature state to a version before it goes live?”
Tell an agent
Add a feature state with value {feature_state_value} to version {environment_feature_version_pk} of feature {feature_pk} in {environment_pk}.
In draft version {environment_feature_version_pk} of {feature_pk} in {environment_pk}, override segment {feature_segment} with {feature_state_value}.
PUT
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/{environment_feature_version_pk}/featurestates/{id}/
Edit a feature state inside a draft version · Update environment feature version state
#
Ask an LLM
“Can I change a feature state that is already part of a draft version?”
“How do I toggle a flag inside a version that hasn't been published?”
Tell an agent
Set feature state {id} in version {environment_feature_version_pk} of feature {feature_pk} in {environment_pk} to value {feature_state_value}.
Toggle versioned state {id} to {enabled} in version {environment_feature_version_pk}, feature {feature_pk}, env {environment_pk}, value {feature_state_value}.
POST
/api/v1/environments/{environment_pk}/features/{feature_pk}/versions/{id}/publish/
Publish a feature version to go live · Publish environment feature version
#
Ask an LLM
“How do I make a drafted feature version live?”
“Can I schedule a feature version to go live at a later time?”
Tell an agent
Publish version {id} of feature {feature_pk} in environment {environment_pk}.
Publish version {id} of feature {feature_pk} in {environment_pk} to go live at {live_from}.
GET
/api/v1/features/feature-segments/
List segment overrides for a feature · List feature segments
#
Ask an LLM
“Which segments override this flag in a given environment?”
“What segment overrides exist for one feature in one environment?”
Tell an agent
List the segment overrides for feature {feature} in environment {environment}.
Show which segments override flag {feature} in environment {environment}.
Ask an LLM
“How do I remove a segment override from a flag in an unversioned environment?”
“Can I delete a segment override without deleting the segment itself?”
Tell an agent destructive · confirm first
Delete segment override {id}.
Remove feature segment {id} so the segment falls back to the environment default.
PUT
/api/v1/features/featurestates/{id}/
Update a feature state or segment override value · Update feature state
#
Ask an LLM
“How can I change a segment override's value by its feature state ID?”
“Can I update a feature state directly without going through an environment key?”
Tell an agent
Update feature state {id} for feature {feature} in environment {environment} to value {feature_state_value}.
Set enabled to {enabled} on feature state {id} (feature {feature}, environment {environment}).
Ask an LLM
“Which Flagsmith organisations can my API key see?”
“What organisations am I a member of?”
Tell an agent
List all organisations I can access.
Show me the organisations my API key belongs to.
GET
/api/v1/organisations/{organisation_pk}/groups/
List permission groups in an organisation · List organization groups
#
Ask an LLM
“What permission groups exist in my organisation?”
“Which user groups have been set up for access control?”
Tell an agent
List the permission groups in organisation {organisation_pk}.
Show every user group set up for access control in organisation {organisation_pk}.
GET
/api/v1/organisations/{organisation_pk}/invites/
List pending organisation invitations · List organization invites
#
Ask an LLM
“Who has been invited to the organisation but not joined yet?”
“Are there any outstanding invites for my organisation?”
Tell an agent
Show the pending invitations for organisation {organisation_pk}.
List who has been invited to organisation {organisation_pk} but hasn't joined.
POST
/api/v1/organisations/{organisation_pk}/invites/
Invite someone to an organisation · Create organization invite
#
Ask an LLM
“How do I invite a teammate to my organisation by email?”
“Can I put a new invitee straight into permission groups?”
Tell an agent
Invite {email} to organisation {organisation_pk}.
Invite {email} to organisation {organisation_pk} as {role} and add them to groups {permission_groups}.
GET
/api/v1/organisations/{organisation_pk}/roles/
List custom roles in an organisation · List organization roles
#
Ask an LLM
“What custom roles have been defined for my organisation?”
“Which roles could I assign to organisation members?”
Tell an agent
List the custom roles in organisation {organisation_pk}.
Show which custom roles I could assign in organisation {organisation_pk}.
GET
/api/v1/organisations/{id}/projects/
List projects in an organisation · List projects in organization
#
Ask an LLM
“What projects exist inside an organisation?”
“Which projects does organisation 12 contain?”
Tell an agent
List the projects in organisation {id}.
Show every project that organisation {id} owns.
Ask an LLM
“What settings and statistics does a project have?”
“Is realtime updates or edge identities turned on for this project?”
Tell an agent
Show the details of project {id}.
Get the configuration and statistics for project {id}.
Ask an LLM
“How do I rename a project?”
“Can I require a minimum number of change request approvals for a project?”
Tell an agent
Rename project {id} to {name}.
Set project {id} (name {name}) to require {minimum_change_request_approvals} change request approvals.
GET
/api/v1/projects/{id}/environments/
List environments in a project · List project environments
#
Ask an LLM
“What environments are configured under one project?”
“Does project 5 have a staging and a production environment?”
Tell an agent
List the environments in project {id}.
Show which environments are configured under project {id}.
GET
/api/v1/projects/{project_pk}/change-requests/
List change requests across a project · List project change requests
#
Ask an LLM
“What change requests are open across every environment in a project?”
“Can I see project-wide change requests that affect a particular segment?”
Tell an agent
List all change requests for project {project_pk}.
Show change requests in project {project_pk} filtered by committed status {committed}.
GET
/api/v1/projects/{project_pk}/feature-health/events/
Get feature health events for a project · Get feature health events
#
Ask an LLM
“Have any flags in my project reported unhealthy events?”
“What feature health monitoring events has this project recorded?”
Tell an agent
Show feature health events for project {project_pk}.
List any unhealthy flag events reported in project {project_pk}.
GET
/api/v1/projects/{project_pk}/features/
List feature flags in a project · List project features
#
Ask an LLM
“What feature flags exist in my project?”
“Can I filter a project's flags by tag, owner or archived status?”
Tell an agent
List the feature flags in project {project_pk}.
List project {project_pk} flags with their live state in environment {environment}.
Ask an LLM
“How do I add a new feature flag to a project?”
“Can a new flag start enabled with an initial value?”
Tell an agent
Create a feature flag named {name} in project {project_pk}.
Create flag {name} in project {project_pk}, enabled by default: {default_enabled}, with initial value {initial_value}.
GET
/api/v1/projects/{project_pk}/features/{feature_pk}/code-references/
Find where a flag is referenced in code · Get feature code references
#
Ask an LLM
“Where in our codebase is this feature flag still used?”
“Is a flag safe to remove, judging by its code references?”
Tell an agent
Show the code references for feature {feature_pk} in project {project_pk}.
Tell me where flag {feature_pk} from project {project_pk} is still used in code.
GET
/api/v1/projects/{project_pk}/features/{feature_pk}/feature-external-resources/
List external resources linked to a flag · Get feature external resources
#
Ask an LLM
“What issues or pull requests are linked to this feature flag?”
“Which external resources are attached to a flag?”
Tell an agent
List the external resources linked to feature {feature_pk} in project {project_pk}.
Show the issues and pull requests linked to flag {feature_pk} in project {project_pk}.
GET
/api/v1/projects/{project_pk}/features/{feature_pk}/mv-options/
List a flag's multivariate options · List feature multivariate options
#
Ask an LLM
“What variants does a multivariate flag have?”
“How is traffic split between a flag's variations by default?”
Tell an agent
List the multivariate options for feature {feature_pk} in project {project_pk}.
Show the variants and their default allocations for flag {feature_pk} in project {project_pk}.
POST
/api/v1/projects/{project_pk}/features/{feature_pk}/mv-options/
Add a variant to a multivariate flag · Create feature multivariate option
#
Ask an LLM
“How do I add another variation to a multivariate flag?”
“Can I give a new variant a default percentage allocation?”
Tell an agent
Add a variant with string value {string_value} to feature {feature} (project {project_pk}, path feature {feature_pk}).
Create a multivariate option on feature {feature_pk} in {project_pk} for feature {feature} with {default_percentage_allocation} percent allocation.
PUT
/api/v1/projects/{project_pk}/features/{feature_pk}/mv-options/{id}/
Edit a multivariate option · Update feature multivariate option
#
Ask an LLM
“Can I change the value of an existing flag variant?”
“What's involved in rebalancing the allocation of one existing variant?”
Tell an agent
Change variant {id} of feature {feature_pk} in project {project_pk} (feature {feature}) to allocation {default_percentage_allocation}.
Update existing variant {id} on feature {feature_pk}, project {project_pk}, feature {feature} to string value {string_value}.
DELETE
/api/v1/projects/{project_pk}/features/{feature_pk}/mv-options/{id}/
Delete a multivariate option · Delete feature multivariate option
#
Ask an LLM
“How do I remove a variation from a multivariate flag?”
“Can I drop one variant without deleting the whole flag?”
Tell an agent destructive · confirm first
Delete variant {id} from feature {feature_pk} in project {project_pk}.
Remove multivariate option {id} from flag {feature_pk} (project {project_pk}).
Ask an LLM
“What are the full details of one feature flag?”
“Who owns a specific flag and what tags does it carry?”
Tell an agent
Show feature flag {id} in project {project_pk}.
Get the owners, tags and settings of flag {id} in project {project_pk}.
PUT
/api/v1/projects/{project_pk}/features/{id}/
Update a feature flag's properties · Update feature
#
Ask an LLM
“How do I rename a feature flag or change its description?”
“Can I archive a flag by updating it?”
Tell an agent
Rename flag {id} in project {project_pk} to {name}.
Set the description of flag {id} in {project_pk} to {description}.
GET
/api/v1/projects/{project_pk}/features/{id}/evaluation-data/
Get evaluation analytics for a flag · Get feature evaluation data
#
Ask an LLM
“How often has a flag been evaluated in production lately?”
“Can I break flag evaluations down by client application version?”
Tell an agent
Show evaluation data for flag {id} in project {project_pk} for environment {environment_id}.
Get evaluations of flag {id} in {project_pk}, environment {environment_id}, over period {period} for app {client_application_name}.
GET
/api/v1/projects/{project_pk}/release-pipelines/
List release pipelines in a project · List project release pipelines
#
Ask an LLM
“What release pipelines has my project configured?”
“Which staged rollout pipelines exist for a project?”
Tell an agent
List the release pipelines in project {project_pk}.
Show the staged rollout pipelines set up in project {project_pk}, ordered by {ordering}.
GET
/api/v1/projects/{project_pk}/release-pipelines/{id}/
Get a release pipeline's details · Get release pipeline
#
Ask an LLM
“What stages and features does a particular release pipeline have?”
“When was a release pipeline published and by whom?”
Tell an agent
Show release pipeline {id} in project {project_pk}.
Tell me the stages and flags in release pipeline {id} of project {project_pk}.
POST
/api/v1/projects/{project_pk}/release-pipelines/{id}/add-feature/
Add a flag to a release pipeline · Add feature to release pipeline
#
Ask an LLM
“How do I put a feature flag into a staged rollout pipeline?”
“Can I attach a flag to an existing release pipeline?”
Tell an agent
Add feature flags {features} to release pipeline {id} ({name}) in project {project_pk}.
Put flags {features} into the staged rollout of pipeline {id} named {name} in project {project_pk}.
Ask an LLM
“What audience segments are defined in my project?”
“Which segments does a particular identity belong to?”
Tell an agent
List the segments in project {project_pk}.
Search project {project_pk} segments by name for {q}.
Ask an LLM
“How do I define a new user segment for targeting?”
“Can I build a segment from trait-based rules?”
Tell an agent
Create segment {name} in project {project_pk} with rules {rules}.
Add a segment {name} to {project_pk} described as {description} using rules {rules}.
GET
/api/v1/projects/{project_pk}/segments/{id}/
Get a segment's rules and details · Get project segment
#
Ask an LLM
“What rules define a particular segment?”
“How many members does a segment have?”
Tell an agent
Show segment {id} in project {project_pk}.
Show the rules and member count of segment {id} in project {project_pk}.
PUT
/api/v1/projects/{project_pk}/segments/{id}/
Update a segment's rules · Update project segment
#
Ask an LLM
“Can I change the targeting rules of an existing segment?”
“What's the way to rename a segment I already made?”
Tell an agent
Replace the rules of segment {id} in project {project_pk} with {rules}, keeping name {name}.
Rename existing segment {id} in {project_pk} to {name} with rules {rules}.