Update the Ruleset for a Flag in an Environment
1 min
PATCH
https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/environments/{environment_key}/ruleset
restoreboolean<p>Marks this update as a version restore so the resulting change is recorded as a restore in the History log. When set to true, restored_from_revision_id is required; the request is rejected with 400 if it is missing or not an integer.</p>
restored_from_revision_idinteger<p>The id of the revision whose configuration is being restored. Required when restore=true (the request is rejected with 400 if omitted, non-integer, or less than 1); ignored otherwise.</p>
acceptstringGenerated from available response content types
200<p>Successful update of the Ruleset.</p>
<p>The response includes RESTful JSON (<a href="https://restfuljson.org/" target="_blank">https://restfuljson.org/</a>) styled links. If a
link is not present in the response, it indicates a user is not authorized to access
the related resource.</p>
400Malformed requests and invalid parameter names and types
401Invalid credentials
403Do not have permission to perform the operation
404Not found. No content
409<p>The change is gated by an active change-approval policy (or flag scheduling was unavailable to verify it); submit it through flag scheduling as a change request.</p>
curl --request PATCH \
--url https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/environments/{environment_key}/ruleset \
--header 'accept: application/json'