Flagsmith

App · 24 actions

Manage Flagsmith feature flags, environments, segments and tags, turn flags on or off and change their values, read the audit log, and follow new flags, flag changes and audit log entries.

Actions

ActionWhat it does
Create environmentAdd an environment to a project.
Create feature flagCreate a feature flag in a project, with the state and value every environment starts with.
Create segmentCreate a segment of users who match all, or any, of the conditions given on their traits.
Create tagCreate a tag for a project's feature flags.
Delete environmentDelete an environment and every flag setting in it.
Delete feature flagDelete a feature flag from every environment of its project.
Delete segmentDelete a segment.
Delete tagDelete a tag and take it off every flag that has it.
Get environmentGet an environment's name, SDK key and settings.
Get feature flagGet a feature flag's settings, tags and owners.
Get projectGet a project's settings.
Get segmentGet a segment and its rules.
List audit logList what changed and who changed it, newest first, optionally for one project or environment.
List environmentsList a project's environments with their SDK keys.
List feature flagsList a project's feature flags, optionally searched by name or filtered by tag, type or archive state.
List flags in environmentList whether each feature flag is on in an environment, and its value.
List organisation usersList the people in an organisation, with their role and last sign-in.
List organisationsList the organisations the API key belongs to.
List projectsList the projects the API key can see.
List segmentsList a project's segments and their rules.
List tagsList the tags a project's feature flags can carry.
Update feature flagChange a feature flag's description or tags, or archive it.
Update flag in environmentTurn a feature flag on or off in one environment, or change its value there.
Update segmentRename a segment or change its description.

Create environment

Add an environment to a project. Its flags start from each feature's defaults.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
NamenametextRequired
The environment's name, such as Staging.
Descriptiondescriptiontext
What the environment is for.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "allow_client_traits": true,
    "api_key": "example",
    "description": "example",
    "hide_disabled_flags": true,
    "id": 1,
    "name": "example",
    "project": 1,
    "use_v2_feature_versioning": true,
    "uuid": "example"
  }
}

Create feature flag

Create a feature flag in a project, with the state and value every environment starts with.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
NamenametextRequired
The flag's name, used in code, such as new_checkout. It can't be changed later.
Descriptiondescriptiontext
What the flag is for.
On by defaultdefault_enabledtrue/false
Whether the flag starts on in every environment. Leave empty for off.
Initial valueinitial_valuetext
The value the flag starts with in every environment, for remote config.
Tagstag_idslist
Tags to put on the feature flag.
Server-side onlyis_server_key_onlytrue/false
Hide the flag from client-side SDKs, so only server-side keys can read it.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "created_date": "example",
    "default_enabled": true,
    "description": "example",
    "environment_feature_state": {
      "enabled": true,
      "environment": 1,
      "feature_segment": 1,
      "feature_state_value": "example",
      "id": 1,
      "identity": 1
    },
    "group_owners": [
      1
    ],
    "id": 1,
    "initial_value": "example",
    "is_archived": true,
    "is_server_key_only": true,
    "last_modified_in_any_environment": "example",
    "lifecycle_stage": "example",
    "name": "example",
    "num_identity_overrides": 1,
    "num_segment_overrides": 1,
    "owners": [
      1
    ],
    "project": 1,
    "tags": [
      1
    ],
    "type": "example",
    "uuid": "example"
  }
}

Create segment

Create a segment of users who match all, or any, of the conditions given on their traits.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
NamenametextRequired
The segment's name, such as beta_testers.
Descriptiondescriptiontext
Who the segment is.
Users matchmatchtext
Whether users must match all the conditions or any one of them. Leave empty for all.One of: ALL (All of the conditions), ANY (Any of the conditions).
ConditionsconditionslistRequired
Each condition: the trait (property), how it compares (operator, such as EQUAL or CONTAINS) and the value.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "feature": 1,
    "id": 1,
    "name": "example",
    "project": 1,
    "rules": [
      {
        "conditions": [
          {
            "description": "example",
            "operator": "example",
            "property": "example",
            "value": "example"
          }
        ],
        "id": 1,
        "rules": [
          {
            "conditions": [
              {
                "description": "example",
                "operator": "example",
                "property": "example",
                "value": "example"
              }
            ],
            "id": 1,
            "type": "example"
          }
        ],
        "type": "example"
      }
    ],
    "updated_at": "example",
    "uuid": "example"
  }
}

Create tag

Create a tag for a project's feature flags.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
LabellabeltextRequired
The tag's name, such as checkout.
Colorcolortext
The tag's color as a hex code, such as #3d4db6.
Descriptiondescriptiontext
What the tag marks.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "color": "example",
    "description": "example",
    "id": 1,
    "is_permanent": true,
    "is_system_tag": true,
    "label": "example",
    "project": 1,
    "uuid": "example"
  }
}

Delete environment

Delete an environment and every flag setting in it.

Inputs

Projectproject_idnumberRequired
The project the environment is in.At least 1.
Environmentenvironment_keytextRequired
The environment.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {}
}

Delete feature flag

Delete a feature flag from every environment of its project.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Feature flagfeature_idnumberRequired
The feature flag.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {}
}

Delete segment

Delete a segment. Flags that targeted it stop doing so.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Segmentsegment_idnumberRequired
The segment.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {}
}

Delete tag

Delete a tag and take it off every flag that has it.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Tagtag_idnumberRequired
The tag.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {}
}

Get environment

Get an environment's name, SDK key and settings.

Inputs

Projectproject_idnumberRequired
The project the environment is in.At least 1.
Environmentenvironment_keytextRequired
The environment.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "allow_client_traits": true,
    "api_key": "example",
    "description": "example",
    "hide_disabled_flags": true,
    "id": 1,
    "name": "example",
    "project": 1,
    "use_v2_feature_versioning": true,
    "uuid": "example"
  }
}

Get feature flag

Get a feature flag's settings, tags and owners.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Feature flagfeature_idnumberRequired
The feature flag.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "created_date": "example",
    "default_enabled": true,
    "description": "example",
    "environment_feature_state": {
      "enabled": true,
      "environment": 1,
      "feature_segment": 1,
      "feature_state_value": "example",
      "id": 1,
      "identity": 1
    },
    "group_owners": [
      1
    ],
    "id": 1,
    "initial_value": "example",
    "is_archived": true,
    "is_server_key_only": true,
    "last_modified_in_any_environment": "example",
    "lifecycle_stage": "example",
    "name": "example",
    "num_identity_overrides": 1,
    "num_segment_overrides": 1,
    "owners": [
      1
    ],
    "project": 1,
    "tags": [
      1
    ],
    "type": "example",
    "uuid": "example"
  }
}

Get project

Get a project's settings.

Inputs

Projectproject_idnumberRequired
The project.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "enable_realtime_updates": true,
    "hide_disabled_flags": true,
    "id": 1,
    "name": "example",
    "organisation": 1,
    "prevent_flag_defaults": true,
    "stale_flags_limit_days": 1,
    "use_edge_identities": true,
    "uuid": "example"
  }
}

Get segment

Get a segment and its rules.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Segmentsegment_idnumberRequired
The segment.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "feature": 1,
    "id": 1,
    "name": "example",
    "project": 1,
    "rules": [
      {
        "conditions": [
          {
            "description": "example",
            "operator": "example",
            "property": "example",
            "value": "example"
          }
        ],
        "id": 1,
        "rules": [
          {
            "conditions": [
              {
                "description": "example",
                "operator": "example",
                "property": "example",
                "value": "example"
              }
            ],
            "id": 1,
            "type": "example"
          }
        ],
        "type": "example"
      }
    ],
    "updated_at": "example",
    "uuid": "example"
  }
}

List audit log

List what changed and who changed it, newest first, optionally for one project or environment.

Inputs

Projectproject_idnumber
Only changes in this project.At least 1.
Environment IDsenvironment_idslist
Only changes in these environments, by their numeric ID.
Searchsearchtext
Only entries whose text contains this (at least 3 characters).
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first.At least 1.
Results per pagepage_sizenumber
How many results a page holds, up to 100. Leave empty for 100.From 1 to 100.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": [
      {
        "author": {
          "email": "example",
          "first_name": "example",
          "id": 1,
          "last_name": "example"
        },
        "created_date": "example",
        "environment": {
          "api_key": "example",
          "id": 1,
          "name": "example"
        },
        "id": 1,
        "is_system_event": true,
        "log": "example",
        "project": {
          "id": 1,
          "name": "example"
        },
        "related_object_id": 1,
        "related_object_type": "example"
      }
    ]
  }
}

List environments

List a project's environments with their SDK keys.

Inputs

Projectproject_idnumberRequired
The project.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": [
      {
        "allow_client_traits": true,
        "api_key": "example",
        "description": "example",
        "hide_disabled_flags": true,
        "id": 1,
        "name": "example",
        "project": 1,
        "use_v2_feature_versioning": true,
        "uuid": "example"
      }
    ]
  }
}

List feature flags

List a project's feature flags, optionally searched by name or filtered by tag, type or archive state.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Searchsearchtext
Only flags whose name contains this.
Tagstag_idslist
Only flags with these tags.
Archivedis_archivedtrue/false
Only archived flags, or only flags that are not archived.
Typetypetext
Only standard or only multivariate flags.One of: STANDARD, MULTIVARIATE.
Sort bysort_fieldtext
What to sort by. Leave empty for date created.One of: created_date (Date created), name.
Sort ordersort_directiontext
Which come first. Leave empty for oldest first.One of: ASC (Oldest or A to Z first), DESC (Newest or Z to A first).
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first.At least 1.
Results per pagepage_sizenumber
How many results a page holds, up to 100. Leave empty for 100.From 1 to 100.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": [
      {
        "created_date": "example",
        "default_enabled": true,
        "description": "example",
        "environment_feature_state": {
          "enabled": true,
          "environment": 1,
          "feature_segment": 1,
          "feature_state_value": "example",
          "id": 1,
          "identity": 1
        },
        "group_owners": [
          1
        ],
        "id": 1,
        "initial_value": "example",
        "is_archived": true,
        "is_server_key_only": true,
        "last_modified_in_any_environment": "example",
        "lifecycle_stage": "example",
        "name": "example",
        "num_identity_overrides": 1,
        "num_segment_overrides": 1,
        "owners": [
          1
        ],
        "project": 1,
        "tags": [
          1
        ],
        "type": "example",
        "uuid": "example"
      }
    ]
  }
}

List flags in environment

List whether each feature flag is on in an environment, and its value.

Inputs

Projectproject_idnumberRequired
The project the environment is in.At least 1.
Environmentenvironment_keytextRequired
The environment.
Feature flagfeature_idnumber
Only this feature flag.At least 1.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": [
      {
        "created_at": "example",
        "enabled": true,
        "environment": 1,
        "feature": 1,
        "feature_segment": 1,
        "feature_state_value": "example",
        "id": 1,
        "identity": 1,
        "live_from": "example",
        "updated_at": "example",
        "uuid": "example"
      }
    ]
  }
}

List organisation users

List the people in an organisation, with their role and last sign-in.

Inputs

Organisationorganisation_idnumberRequired
The organisation.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "users": [
      {
        "date_joined": "example",
        "email": "example",
        "first_name": "example",
        "id": 1,
        "last_login": "example",
        "last_name": "example",
        "role": "example"
      }
    ]
  }
}

List organisations

List the organisations the API key belongs to.

Inputs

None.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": [
      {
        "created_date": "example",
        "id": 1,
        "name": "example",
        "num_seats": 1,
        "uuid": "example"
      }
    ]
  }
}

List projects

List the projects the API key can see.

Inputs

None.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "projects": [
      {
        "enable_realtime_updates": true,
        "hide_disabled_flags": true,
        "id": 1,
        "name": "example",
        "organisation": 1,
        "prevent_flag_defaults": true,
        "stale_flags_limit_days": 1,
        "use_edge_identities": true,
        "uuid": "example"
      }
    ]
  }
}

List segments

List a project's segments and their rules.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Searchsearchtext
Only segments whose name contains this.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first.At least 1.
Results per pagepage_sizenumber
How many results a page holds, up to 100. Leave empty for 100.From 1 to 100.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": [
      {
        "created_at": "example",
        "description": "example",
        "feature": 1,
        "id": 1,
        "name": "example",
        "project": 1,
        "rules": [
          {
            "conditions": [
              {
                "description": "example",
                "operator": "example",
                "property": "example",
                "value": "example"
              }
            ],
            "id": 1,
            "rules": [
              {
                "conditions": [
                  {
                    "description": "example",
                    "operator": "example",
                    "property": "example",
                    "value": "example"
                  }
                ],
                "id": 1,
                "type": "example"
              }
            ],
            "type": "example"
          }
        ],
        "updated_at": "example",
        "uuid": "example"
      }
    ]
  }
}

List tags

List the tags a project's feature flags can carry.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first.At least 1.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": [
      {
        "color": "example",
        "description": "example",
        "id": 1,
        "is_permanent": true,
        "is_system_tag": true,
        "label": "example",
        "project": 1,
        "uuid": "example"
      }
    ]
  }
}

Update feature flag

Change a feature flag's description or tags, or archive it.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Feature flagfeature_idnumberRequired
The feature flag.At least 1.
Descriptiondescriptiontext
What the flag is for.
Tagstag_idslist
The flag's tags. These replace the tags it has.
Archivedis_archivedtrue/false
Archive the flag, or bring it back from the archive.
Server-side onlyis_server_key_onlytrue/false
Hide the flag from client-side SDKs, so only server-side keys can read it.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "created_date": "example",
    "default_enabled": true,
    "description": "example",
    "environment_feature_state": {
      "enabled": true,
      "environment": 1,
      "feature_segment": 1,
      "feature_state_value": "example",
      "id": 1,
      "identity": 1
    },
    "group_owners": [
      1
    ],
    "id": 1,
    "initial_value": "example",
    "is_archived": true,
    "is_server_key_only": true,
    "last_modified_in_any_environment": "example",
    "lifecycle_stage": "example",
    "name": "example",
    "num_identity_overrides": 1,
    "num_segment_overrides": 1,
    "owners": [
      1
    ],
    "project": 1,
    "tags": [
      1
    ],
    "type": "example",
    "uuid": "example"
  }
}

Update flag in environment

Turn a feature flag on or off in one environment, or change its value there.

Inputs

Projectproject_idnumberRequired
The project the environment is in.At least 1.
Environmentenvironment_keytextRequired
The environment.
Feature flagfeature_idnumberRequired
The feature flag.At least 1.
Onenabledtrue/false
Whether the flag is on in this environment. Leave empty to keep it as it is.
Valuevaluetext
The flag's value in this environment, for remote config. Leave empty to keep it.
Value typevalue_typetext
How the value is kept. Leave empty for text.One of: string (Text), integer (Whole number), boolean (True or false).

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "created_at": "example",
    "enabled": true,
    "environment": 1,
    "feature": 1,
    "feature_segment": 1,
    "feature_state_value": "example",
    "id": 1,
    "identity": 1,
    "live_from": "example",
    "updated_at": "example",
    "uuid": "example"
  }
}

Update segment

Rename a segment or change its description. Its rules stay as they are.

Inputs

Projectproject_idnumberRequired
The project.At least 1.
Segmentsegment_idnumberRequired
The segment.At least 1.
Namenametext
The segment's new name.
Descriptiondescriptiontext
Who the segment is.

Outputs

dataobject
The response from Flagsmith.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "feature": 1,
    "id": 1,
    "name": "example",
    "project": 1,
    "rules": [
      {
        "conditions": [
          {
            "description": "example",
            "operator": "example",
            "property": "example",
            "value": "example"
          }
        ],
        "id": 1,
        "rules": [
          {
            "conditions": [
              {
                "description": "example",
                "operator": "example",
                "property": "example",
                "value": "example"
              }
            ],
            "id": 1,
            "type": "example"
          }
        ],
        "type": "example"
      }
    ],
    "updated_at": "example",
    "uuid": "example"
  }
}

On this page