action configcat_update_setting { label: "Update Flag" description: "This endpoint updates the metadata of a Feature Flag or Setting \nwith a collection of [JSON Patch](http://jsonpatch.com) operations in a specified Config.\n\nOnly the `name`, `hint` and `tags` attributes are modifiable by this endpoint.\nThe `tags` attribute is a simple collection of the [tag IDs](#operation/get-tags) attached to the given setting.\n\nThe advantage of using JSON Patch is that you can describe individual update operations on a resource\nwithout touching attributes that you don't want to change.\n\nFor example: We have the following resource.\n```\n{\n \"settingId\": 5345,\n \"key\": \"myGrandFeature\",\n \"name\": \"Tihs is a naem with soem typos.\",\n \"hint\": \"This flag controls my grandioso feature.\",\n \"settingType\": \"boolean\",\n \"tags\": [\n {\n \"tagId\": 0,\n \"name\": \"sample tag\",\n \"color\": \"whale\"\n }\n ]\n}\n```\nIf we send an update request body as below (it changes the name and adds the already existing tag with the id 2):\n```\n[\n {\n \"op\": \"replace\",\n \"path\": \"/name\",\n \"value\": \"This is the name without typos.\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/tags/-\",\n \"value\": 2\n }\n]\n```\nOnly the `name` and `tags` are going to be updated and all the other attributes are remaining unchanged.\nSo we get a response like this:\n```\n{\n \"settingId\": 5345,\n \"key\": \"myGrandFeature\",\n \"name\": \"This is the name without typos.\",\n \"hint\": \"This flag controls my grandioso feature.\",\n \"settingType\": \"boolean\",\n \"tags\": [\n {\n \"tagId\": 0,\n \"name\": \"sample tag\",\n \"color\": \"whale\"\n },\n {\n \"tagId\": 2,\n \"name\": \"another tag\",\n \"color\": \"koala\"\n }\n ]\n}\n```" provider: configcat method: PATCH path: "/v1/settings/{settingId}" encoding: json input: { type: "object" properties: { operations: { type: "array" items: { type: "object" properties: { from: { type: "object" properties: { isUriEncoded: { type: "boolean" } kind: { type: "string" enum: ["unspecified", "plain", "uriEncoded"] } segments: { type: "array" items: { type: "object" properties: { source: { type: "string" } value: { type: "string" } } additionalProperties: false } } source: { type: "string" } } additionalProperties: false } op: { type: "string" enum: ["unknown", "add", "remove", "replace", "move", "copy", "test"] } path: { type: "object" additionalProperties: true } value: { type: "object" properties: { options: { type: "object" properties: { propertyNameCaseInsensitive: { type: "boolean" } } additionalProperties: false } parent: { type: "object" additionalProperties: true } root: { type: "object" additionalProperties: true } } additionalProperties: false } } additionalProperties: false } } settingId: { type: "integer" format: "int32" } } required: ["settingId"] additionalProperties: false } output: { type: "object" properties: { configId: { type: "string" format: "uuid" } configName: { type: "string" } hint: { type: "string" } key: { type: "string" } name: { type: "string" } order: { type: "integer" format: "int32" } settingId: { type: "integer" format: "int32" } settingType: { type: "string" enum: ["boolean", "string", "int", "double"] } tags: { type: "array" items: { type: "object" properties: { color: { type: "string" } name: { type: "string" } product: { type: "object" properties: { description: { type: "string" } name: { type: "string" } order: { type: "integer" format: "int32" } organization: { type: "object" properties: { name: { type: "string" } organizationId: { type: "string" format: "uuid" } } additionalProperties: false } productId: { type: "string" format: "uuid" } reasonRequired: { type: "boolean" } } additionalProperties: false } tagId: { type: "integer" format: "int64" } } additionalProperties: false } } } additionalProperties: false } }