# Updates a Target Group Updates a Target Group for the given identifier Endpoint: PATCH /cf/admin/segments/{identifier} Version: 1.0 Security: x-api-key ## Query parameters: - `accountIdentifier` (string, required) Account Identifier - `orgIdentifier` (string, required) Organization Identifier - `projectIdentifier` (string, required) The Project identifier - `environmentIdentifier` (string, required) Environment Identifier ## Path parameters: - `identifier` (string, required) Unique identifier for the object in the API. ## Request fields (application/json): - `comment` (string) A comment explaining the reason for this patch operation Example: "This is a comment string" - `executionTime` (integer) Time of execution in unix epoch milliseconds when the scheduled changes will be applied - `gitDetails` (object) The commit message to use as part of a gitsync operation - `gitDetails.commitMsg` (string, required) A description of the change or action Example: "Turning on flag test-flag for production" - `instructions` (array, required) A list of Patch Instructions - `instructions.kind` (string, required) The name of the modification you would like to perform on a resource. Example: "enableFeatureFlag" - `instructions.parameters` (object, required) Example: {"ruleId":"TestRule","variationID":"TestVariation"} ## Response 200 fields (application/json): - `createdAt` (integer) The data and time in milliseconds when the group was created - `environment` (string) The environment this target group belongs to Example: "Production" - `excluded` (array) A list of Targets who are excluded from this target group - `excluded.account` (string, required) The account ID that the target belongs to Example: "abcXDdffdaffd" - `excluded.anonymous` (boolean) Indicates if this target is anonymous - `excluded.attributes` (object) a JSON representation of the attributes for this target Example: {"age":20,"location":"Belfast"} - `excluded.createdAt` (integer) The date and time in milliseconds when this Target was created - `excluded.environment` (string, required) The identifier for the environment that the target belongs to - `excluded.identifier` (string, required) The unique identifier for this target Example: "john-doe" - `excluded.name` (string, required) The name of this Target Example: "John Doe" - `excluded.org` (string, required) The identifier for the organization that the target belongs to - `excluded.project` (string, required) The identifier for the project that this target belongs to - `excluded.segments` (array) A list of Target Groups (Segments) that this Target belongs to - `identifier` (string, required) Unique identifier for the target group. - `included` (array) A list of Targets who belong to this target group - `modifiedAt` (integer) The data and time in milliseconds when the group was last modified - `name` (string, required) Name of the target group. Example: "Beta Testers" - `rules` (array) - `rules.attribute` (string, required) The attribute to use in the clause. This can be any target attribute Example: "identifier" - `rules.id` (string) The unique ID for the clause Example: 32434243 - `rules.negate` (boolean, required) Is the operation negated? - `rules.op` (string, required) The type of operation such as equals, starts_with, contains Example: "starts_with" - `rules.values` (array, required) The values that are compared against the operator - `servingRules` (array) An array of rules that can cause a user to be included in this segment. - `servingRules.clauses` (array, required) A list of clauses to use in the rule - `servingRules.priority` (integer, required) The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest Example: 1 - `servingRules.ruleId` (string, required) The unique identifier for this rule - `tags` (array) Tags for this target group - `tags.identifier` (string, required) The identifier of the tag Example: "feature-flag-tag-1" - `tags.name` (string, required) The name of the tag Example: "feature-flag-tag-1" - `version` (integer) The version of this group. Each time it is modified the version is incremented Example: 1 ## Response 400 fields (application/json): - `code` (string, required) The http error code Example: 404 - `details` (object) Additional details about the error - `message` (string, required) The reason the request failed Example: "Error retrieving projects, organization 'default_org' does not exist" ## Response 401 fields (application/json): - `code` (string, required) The http error code Example: "404" - `details` (object) Additional details about the error - `message` (string, required) The reason the request failed ## Response 403 fields (application/json): - `code` (string, required) The http error code Example: "404" - `details` (object) Additional details about the error - `message` (string, required) The reason the request failed ## Response 404 fields (application/json): - `code` (string, required) The http error code Example: "404" - `details` (object) Additional details about the error - `message` (string, required) The reason the request failed ## Response 409 fields (application/json): - `code` (string, required) The http error code Example: 404 - `details` (object) Additional details about the error - `message` (string, required) The reason the request failed Example: "Error retrieving projects, organization 'default_org' does not exist" ## Response 500 fields (application/json): - `code` (string, required) The http error code Example: "404" - `details` (object) Additional details about the error - `message` (string, required) The reason the request failed