Skip to main content

Update Flag

PATCH 

/v1/settings/:settingId

This endpoint updates the metadata of a Feature Flag or Setting with a collection of JSON Patch operations in a specified Config.

Only the name, hint and tags attributes are modifiable by this endpoint. The tags attribute is a simple collection of the tag IDs attached to the given setting.

The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change.

For example: We have the following resource.

{
"settingId": 5345,
"key": "myGrandFeature",
"name": "Tihs is a naem with soem typos.",
"hint": "This flag controls my grandioso feature.",
"settingType": "boolean",
"tags": [
{
"tagId": 0,
"name": "sample tag",
"color": "whale"
}
]
}

If we send an update request body as below (it changes the name and adds the already existing tag with the id 2):

[
{
"op": "replace",
"path": "/name",
"value": "This is the name without typos."
},
{
"op": "add",
"path": "/tags/-",
"value": 2
}
]

Only the name and tags are updated and all the other attributes remain unchanged. So we get a response like this:

{
"settingId": 5345,
"key": "myGrandFeature",
"name": "This is the name without typos.",
"hint": "This flag controls my grandioso feature.",
"settingType": "boolean",
"tags": [
{
"tagId": 0,
"name": "sample tag",
"color": "whale"
},
{
"tagId": 2,
"name": "another tag",
"color": "koala"
}
]
}

Request

Path Parameters

    settingId int32required

    The identifier of the Setting.

Body

required

  • Array [

  • op OperationTyperequired

    Possible values: [unknown, add, remove, replace, move, copy, test]

    path stringrequired

    Possible values: non-empty

    The source path.

    from stringnullable

    The target path.

    value nullable

    The discrete value.

  • ]

Responses

When the update was successful.

Schema

    settingId int32

    Identifier of the Feature Flag or Setting.

    key stringnullable

    Key of the Feature Flag or Setting.

    name stringnullable

    Name of the Feature Flag or Setting.

    hint stringnullable

    Description of the Feature Flag or Setting.

    order int32

    The order of the Feature Flag or Setting represented on the ConfigCat Dashboard.

    settingType SettingType

    Possible values: [boolean, string, int, double]

    The type of the Feature Flag or Setting.

    configId uuid

    Identifier of the Feature Flag's Config.

    configName stringnullable

    Name of the Feature Flag's Config.

    tags

    object[]

    nullable

    The tags attached to the Feature Flag or Setting.

  • Array [

  • product

    object

    Details of the Product.

    organization

    object

    Details of the Organization.

    organizationId uuid

    Identifier of the Organization.

    name stringnullable

    Name of the Organization.

    productId uuid

    Identifier of the Product.

    name stringnullable

    Name of the Product.

    description stringnullable

    Description of the Product.

    order int32

    The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.

    reasonRequired boolean

    Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.

    tagId int64

    Identifier of the Tag.

    name stringnullable

    Name of the Tag.

    color stringnullable

    The configured color of the Tag.

  • ]

Loading...