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
The identifier of the Setting.
- application/json
- text/json
- application/*+json
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
Possible values: non-empty
The source path.
The target path.
The discrete value.
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
Possible values: non-empty
The source path.
The target path.
The discrete value.
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
Possible values: non-empty
The source path.
The target path.
The discrete value.
Responses
- 200
- 400
- 404
- 429
When the update was successful.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Identifier of the Feature Flag or Setting.
Key of the Feature Flag or Setting.
Name of the Feature Flag or Setting.
Description of the Feature Flag or Setting.
The order of the Feature Flag or Setting represented on the ConfigCat Dashboard.
Possible values: [boolean
, string
, int
, double
]
The type of the Feature Flag or Setting.
Identifier of the Feature Flag's Config.
Name of the Feature Flag's Config.
tags
object[]
nullable
The tags attached to the Feature Flag or Setting.
product
object
Details of the Product.
organization
object
Details of the Organization.
Identifier of the Organization.
Name of the Organization.
Identifier of the Product.
Name of the Product.
Description of the Product.
The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.
Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.
Identifier of the Tag.
Name of the Tag.
The configured color of the Tag.
{
"settingId": 0,
"key": "string",
"name": "string",
"hint": "string",
"order": 0,
"settingType": "boolean",
"configId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"configName": "string",
"tags": [
{
"product": {
"organization": {
"organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"order": 0,
"reasonRequired": true
},
"tagId": 0,
"name": "string",
"color": "string"
}
]
}
Bad request.
Not found.
Too many requests. In case of the request rate exceeds the rate limits.