Skip to content

Create new experimental endpoints to update a given feature in an environment #6233

@matthewelwell

Description

@matthewelwell

Related issues / PRs: #6221, #6029, #6279

We need to create 2 new endpoints which will allow us to have a single endpoint to update a feature in an environment, regardless of whether the environment has v2 feature versioning enabled or not.

The 2 new endpoints will look very similar with subtle differences to allow us to determine (via customer feedback) if we want both, or prefer one over the other. One endpoint will cater for updating both the environment default flag, as well as creating and updating segment overrides, all in a single request. The other will expect each atomic update to be done in an individual request. The expected payloads are given below.

Some other notes:

  1. For these experimental endpoints, we are going to ignore multivariate updates
// Update all components of a feature in one request
{
  "feature": {
    // only one of these should be included in each request
    "name": "my_feature_name",
    "id": 1
  },
  "environment_default": {
    "enabled": true,
    "value": {
      "string_value": "",
      "type": "integer" // one of "integer", "string", "boolean", "float"
    }
  },
  "segment_overrides": [
    {
      "segment": {
        "id": 1,
        "priority": 1 // can be null / omitted, which will add it to the bottom of the list
      },
      "enabled": true,
      "value": {
        "string_value": "",
        "type": "integer"
        // one of "integer", "string", "boolean", "float"
      }
    }
  ]
}
// Update individual component of a feature in each request
{
  "feature": {
    // only one of these should be included in each request
    "name": "my_feature_name",
    "id": 1
  },
  "segment": {
    // since segment name is not unique (yet), we can't
    // offer name here like we do for feature
    "id": 1,
    "priority": 1 // can be null / omitted, which will add it to the bottom of the list
  },
  "enabled": true,
  "value": {
    "string_value": "",
    "type": "integer" // one of "integer", "string", "boolean", "float"
  },
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions