---
title: "PUT /mr-api/features/{eid}"
method: PUT
path: "/mr-api/features/{eid}"
tags: ["EnvironmentFeatureService"]
---

# PUT /mr-api/features/{eid}

`PUT /mr-api/features/{eid}`

Update all features for this environment that are passed. Ignores any other feature values that are not passed.

## Request body

- FeatureValue[]
  - `id` string, uuid
  - `key` string, required
  - `locked` boolean, required
  - `valueString` string — default value if no strategy matches. interpreted by type in parent
  - `valueNumber` number
  - `valueBoolean` boolean
  - `valueJson` string
  - `retired` boolean — if false or null, this feature will visible on edge. if true, it will not be passed to the client
  - `rolloutStrategyInstances` RolloutStrategyInstance[]
    - `name` string — This is copied from the shared rollout strategy on return, it is read only from the client perspective
    - `strategyId` string, uuid
    - `value` unknown
    - `disabled` boolean
  - `rolloutStrategies` RolloutStrategy[] — These are custom rollout strategies that only apply to this feature value.
    - `id` string
    - `percentage` integer — value between 0 and 1000000 - for four decimal places
    - `percentageAttributes` string[] — if you don't wish to apply percentage based on user id, you can use one or more attributes defined here
    - `value` unknown
    - `attributes` object[]
      - `conditional` 'EQUALS' | 'ENDS_WITH' | 'STARTS_WITH' | 'GREATER' | 'GREATER_EQUALS' | 'LESS' | 'LESS_EQUALS' | 'NOT_EQUALS' | 'INCLUDES' | 'EXCLUDES' | 'REGEX'
      - `fieldName` string
      - `values` RolloutStrategyArrayType[] — the value(s) associated with this rule
        - unknown
      - `type` 'STRING' | 'SEMANTIC_VERSION' | 'NUMBER' | 'DATE' | 'DATETIME' | 'BOOLEAN' | 'IP_ADDRESS'
      - `id` string — A temporary id used only when validating. Saving strips these out as they are not otherwise necessary
    - `name` string, required — names are unique in a case insensitive fashion
    - `colouring` integer — the colour used to display the strategy in the UI. indexed table of background/foreground combos.
    - `avatar` string — url to avatar (if any). Not sent to SDK. Preferably a unicorn.
  - `sharedRolloutStrategies` RolloutStrategy[] — This is list is either provided empty (when publishing) or anemic so the MR will client will understand which shared strategies are attached without having to back-call. If provided then it will mirror rolloutStrategyInstances and only enabled ones will be passed back. The value from the rolloutStrategyInstance will be embedded. This field will _always_ be ignored when being sent back to the server, only rolloutStrategyInstances is used.
    - `id` string
    - `percentage` integer — value between 0 and 1000000 - for four decimal places
    - `percentageAttributes` string[] — if you don't wish to apply percentage based on user id, you can use one or more attributes defined here
    - `value` unknown
    - `attributes` object[]
      - `conditional` 'EQUALS' | 'ENDS_WITH' | 'STARTS_WITH' | 'GREATER' | 'GREATER_EQUALS' | 'LESS' | 'LESS_EQUALS' | 'NOT_EQUALS' | 'INCLUDES' | 'EXCLUDES' | 'REGEX'
      - `fieldName` string
      - `values` RolloutStrategyArrayType[] — the value(s) associated with this rule
        - unknown
      - `type` 'STRING' | 'SEMANTIC_VERSION' | 'NUMBER' | 'DATE' | 'DATETIME' | 'BOOLEAN' | 'IP_ADDRESS'
      - `id` string — A temporary id used only when validating. Saving strips these out as they are not otherwise necessary
    - `name` string, required — names are unique in a case insensitive fashion
    - `colouring` integer — the colour used to display the strategy in the UI. indexed table of background/foreground combos.
    - `avatar` string — url to avatar (if any). Not sent to SDK. Preferably a unicorn.
  - `featureGroupStrategies` FeatureGroupFeatureValueStrategy[] — There are strategies provided by feature groups (if any)
    - `featureGroupId` string, uuid
    - `strategyName` string
    - `value` unknown
  - `environmentId` string, uuid
  - `version` integer — used for optimistic locking
  - `whoUpdated` Person
    - `id` PersonId
      - `id` string, uuid, required
    - `name` string
    - `email` string, email
    - `personType` 'person' | 'serviceAccount' | 'sdkServiceAccount'
    - `other` string
    - `source` string
    - `version` integer
    - `passwordRequiresReset` boolean
    - `groups` Group[]
      - `createdBy` Person — recursive
      - `updatedBy` Person — recursive
      - `whenCreated` string, date-time
      - `whenUpdated` string, date-time
      - `id` string, uuid
      - `admin` boolean — is this an admin group?
      - `portfolioId` string, uuid
      - `organizationId` string, uuid — this will be the organisation this group belongs to at the top level, or if a portfolio group, the organisation of the portfolio
      - `version` integer
      - `name` string, required
      - `members` Person[]
      - `applicationRoles` ApplicationGroupRole[]
        - `applicationId` string, uuid, required
        - `groupId` string, uuid, required
        - `roles` ApplicationRoleType[], required
      - `environmentRoles` EnvironmentGroupRole[]
        - `environmentId` string, uuid, required
        - `groupId` string, uuid, required
        - `roles` RoleType[], required
      - `whenArchived` string, date-time
    - `whenArchived` string, date-time
    - `whenLastAuthenticated` string, date-time — This is the timestamp in UTC when they last logged into the system
    - `whenLastSeen` string, date-time — This is the timestamp in UTC when they last made a request to the system on their most recent login. If it is null it means they have no current token or have never logged in.
    - `additional` PersonInfo[]
      - `key` string, required — e.g. serviceAccountId
      - `value` string, required
  - `whenUpdated` string, date-time
  - `whatUpdated` string

## Response `200`

Resulting features

- FeatureValue[]
  - `id` string, uuid
  - `key` string, required
  - `locked` boolean, required
  - `valueString` string — default value if no strategy matches. interpreted by type in parent
  - `valueNumber` number
  - `valueBoolean` boolean
  - `valueJson` string
  - `retired` boolean — if false or null, this feature will visible on edge. if true, it will not be passed to the client
  - `rolloutStrategyInstances` RolloutStrategyInstance[]
    - `name` string — This is copied from the shared rollout strategy on return, it is read only from the client perspective
    - `strategyId` string, uuid
    - `value` unknown
    - `disabled` boolean
  - `rolloutStrategies` RolloutStrategy[] — These are custom rollout strategies that only apply to this feature value.
    - `id` string
    - `percentage` integer — value between 0 and 1000000 - for four decimal places
    - `percentageAttributes` string[] — if you don't wish to apply percentage based on user id, you can use one or more attributes defined here
    - `value` unknown
    - `attributes` object[]
      - `conditional` 'EQUALS' | 'ENDS_WITH' | 'STARTS_WITH' | 'GREATER' | 'GREATER_EQUALS' | 'LESS' | 'LESS_EQUALS' | 'NOT_EQUALS' | 'INCLUDES' | 'EXCLUDES' | 'REGEX'
      - `fieldName` string
      - `values` RolloutStrategyArrayType[] — the value(s) associated with this rule
        - unknown
      - `type` 'STRING' | 'SEMANTIC_VERSION' | 'NUMBER' | 'DATE' | 'DATETIME' | 'BOOLEAN' | 'IP_ADDRESS'
      - `id` string — A temporary id used only when validating. Saving strips these out as they are not otherwise necessary
    - `name` string, required — names are unique in a case insensitive fashion
    - `colouring` integer — the colour used to display the strategy in the UI. indexed table of background/foreground combos.
    - `avatar` string — url to avatar (if any). Not sent to SDK. Preferably a unicorn.
  - `sharedRolloutStrategies` RolloutStrategy[] — This is list is either provided empty (when publishing) or anemic so the MR will client will understand which shared strategies are attached without having to back-call. If provided then it will mirror rolloutStrategyInstances and only enabled ones will be passed back. The value from the rolloutStrategyInstance will be embedded. This field will _always_ be ignored when being sent back to the server, only rolloutStrategyInstances is used.
    - `id` string
    - `percentage` integer — value between 0 and 1000000 - for four decimal places
    - `percentageAttributes` string[] — if you don't wish to apply percentage based on user id, you can use one or more attributes defined here
    - `value` unknown
    - `attributes` object[]
      - `conditional` 'EQUALS' | 'ENDS_WITH' | 'STARTS_WITH' | 'GREATER' | 'GREATER_EQUALS' | 'LESS' | 'LESS_EQUALS' | 'NOT_EQUALS' | 'INCLUDES' | 'EXCLUDES' | 'REGEX'
      - `fieldName` string
      - `values` RolloutStrategyArrayType[] — the value(s) associated with this rule
        - unknown
      - `type` 'STRING' | 'SEMANTIC_VERSION' | 'NUMBER' | 'DATE' | 'DATETIME' | 'BOOLEAN' | 'IP_ADDRESS'
      - `id` string — A temporary id used only when validating. Saving strips these out as they are not otherwise necessary
    - `name` string, required — names are unique in a case insensitive fashion
    - `colouring` integer — the colour used to display the strategy in the UI. indexed table of background/foreground combos.
    - `avatar` string — url to avatar (if any). Not sent to SDK. Preferably a unicorn.
  - `featureGroupStrategies` FeatureGroupFeatureValueStrategy[] — There are strategies provided by feature groups (if any)
    - `featureGroupId` string, uuid
    - `strategyName` string
    - `value` unknown
  - `environmentId` string, uuid
  - `version` integer — used for optimistic locking
  - `whoUpdated` Person
    - `id` PersonId
      - `id` string, uuid, required
    - `name` string
    - `email` string, email
    - `personType` 'person' | 'serviceAccount' | 'sdkServiceAccount'
    - `other` string
    - `source` string
    - `version` integer
    - `passwordRequiresReset` boolean
    - `groups` Group[]
      - `createdBy` Person — recursive
      - `updatedBy` Person — recursive
      - `whenCreated` string, date-time
      - `whenUpdated` string, date-time
      - `id` string, uuid
      - `admin` boolean — is this an admin group?
      - `portfolioId` string, uuid
      - `organizationId` string, uuid — this will be the organisation this group belongs to at the top level, or if a portfolio group, the organisation of the portfolio
      - `version` integer
      - `name` string, required
      - `members` Person[]
      - `applicationRoles` ApplicationGroupRole[]
        - `applicationId` string, uuid, required
        - `groupId` string, uuid, required
        - `roles` ApplicationRoleType[], required
      - `environmentRoles` EnvironmentGroupRole[]
        - `environmentId` string, uuid, required
        - `groupId` string, uuid, required
        - `roles` RoleType[], required
      - `whenArchived` string, date-time
    - `whenArchived` string, date-time
    - `whenLastAuthenticated` string, date-time — This is the timestamp in UTC when they last logged into the system
    - `whenLastSeen` string, date-time — This is the timestamp in UTC when they last made a request to the system on their most recent login. If it is null it means they have no current token or have never logged in.
    - `additional` PersonInfo[]
      - `key` string, required — e.g. serviceAccountId
      - `value` string, required
  - `whenUpdated` string, date-time
  - `whatUpdated` string

## Other responses

- `400` — Bad Request
- `401` — no permission
- `403` — Forbidden, no permission to change role
- `404` — not found
- `409` — Conflict in trying to save, someone else updated a record first
- `422` — There were validation failures in the rollout strategies

---

[API](https://skmtc.net/featurehub-io/apis/managementresourceapi.md) · [All operations](https://skmtc.net/featurehub-io/apis/managementresourceapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/featurehub-io/managementresourceapi/versions/faed5fd616c3/schema)
