PATCH /experiments/{experiment_id}/sections/{section_id}
(Beta) Update a section by ID within the specified multivariate test.
Servers
- https://api.optimizely.com/v2
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
experiment_id |
Integer | Yes |
The ID of the Multivariate Test the requested Section is part of |
section_id |
Integer | Yes |
The ID of the Section you want to update |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
name |
String | No |
The name of this Section |
variations[] |
Array | No | |
variations[].actions[] |
Array | No |
A collection of changes to run for each page in an experiment. Only applicable to Optimizely X Web. |
variations[].actions[].changes[] |
Array | No |
The list of changes to apply to the Page. If 'dependencies' is supplied in a Change within 'changes', each ID in 'dependencies' must also be in 'changes'. |
variations[].actions[].changes[].preserve_parameters |
Boolean | No |
Whether or not to preserve parameters from original request when redirecting to new destination URL. Required for changes of type 'redirect'. For redirects using |
variations[].actions[].changes[].attributes |
Object | No | |
variations[].actions[].changes[].attributes.href |
String | No |
Value of href attribute to add to element(s) matched by a selector |
variations[].actions[].changes[].attributes.html |
String | No |
Value of HTML attribute to add to element(s) matched by a selector |
variations[].actions[].changes[].attributes.remove |
Boolean | No |
Whether or not to remove the element(s) matched by a selector |
variations[].actions[].changes[].attributes.text |
String | No |
Value of text attribute to add to the element(s) matched by a selector |
variations[].actions[].changes[].attributes.hide |
Boolean | No |
Whether or not to hide the element(s) matched by a selector |
variations[].actions[].changes[].attributes.class |
String | No |
Name of the class to set the element(s) matched by a selector to |
variations[].actions[].changes[].attributes.src |
String | No |
Value of src attribute to add to element(s) matched by a selector |
variations[].actions[].changes[].attributes.style |
String | No |
Value of style attribute to add to element(s) matched by a selector |
variations[].actions[].changes[].destination_function |
String | No |
A function string to redirect to. Required for changes of type 'redirect'. |
variations[].actions[].changes[].destination |
String | No |
URL to redirect to. Required for changes of type 'redirect'. |
variations[].actions[].changes[].rearrange |
Object | No |
A directive to place the DOM element(s) matched by 'selector' to the position of the element matched by 'insertSelector', with the relation specified by 'operator'. The supplied example moves element matched by 'selector' above the element of class .greyBox |
variations[].actions[].changes[].config |
Object | No |
Configuration properties for the extension |
variations[].actions[].changes[].value |
String | No |
The value for the change can be custom Javascript or CSS as a string. Required for changes of type 'custom_css' and 'custom_code' |
variations[].actions[].changes[].extension_id |
String | No |
ID of the extension to insert. Required for changes of type 'extension' |
variations[].actions[].changes[].id |
String | No |
The ID of the change |
variations[].actions[].changes[].selector |
String | No |
CSS selector to determine where changes are applied. Required for changes of type 'attribute', 'insert_html', and 'insert_image' |
variations[].actions[].changes[].name |
String | No |
Name of the change |
variations[].actions[].changes[].operator |
String | No |
Where to instert HTML or image for types 'insert_html' and 'insert_image' with respect to the element(s) matched by 'selector' |
variations[].actions[].changes[].dependencies[] |
Array | No |
A list of dependent change IDs that must happen before this change |
variations[].actions[].changes[].src |
String | No |
The path to the change payload on the CDN. Only present if 'async' is True. |
variations[].actions[].changes[].css |
Object | No | |
variations[].actions[].changes[].css.font-size |
String | No | |
variations[].actions[].changes[].css.height |
String | No | |
variations[].actions[].changes[].css.border-width |
String | No | |
variations[].actions[].changes[].css.width |
String | No | |
variations[].actions[].changes[].css.background-image |
String | No | |
variations[].actions[].changes[].css.border-style |
String | No | |
variations[].actions[].changes[].css.font-weight |
String | No | |
variations[].actions[].changes[].css.position |
String | No | |
variations[].actions[].changes[].css.background-color |
String | No | |
variations[].actions[].changes[].css.border-color |
String | No | |
variations[].actions[].changes[].css.color |
String | No | |
variations[].actions[].changes[].type |
String | Yes |
The type of this change.
Valid values:
|
variations[].actions[].changes[].allow_additional_redirect |
Boolean | No |
Whether or not to allow additional redirects after redirecting to destination. Required for changes of type 'redirect' |
variations[].actions[].changes[].async |
Boolean | No |
Indicates whether or not to execute the change asyncronously. If true, src will be returned in the response. Otherwise, it will be not included. |
variations[].actions[].share_link |
String | No |
The share link for the provided Variation and Page combination |
variations[].actions[].page_id |
Integer | Yes |
The ID of the Page to apply changes to |
variations[].name |
String | No |
The name of the variation. Required for Web Experiments and Personalization experiences. Not required for Full Stack Experiments. |
variations[].archived |
Boolean | No |
Whether the variation is archived |
variations[].description |
String | No |
A description of the variation. |
variations[].key |
String | No |
Unique string identifier for this variation within the Experiment. Only applicable for Full Stack and Mobile projects. |
variations[].feature_enabled |
Boolean | No |
For Feature Tests, indicates if the feature should be enabled for the variation |
variations[].variable_values |
Object | No |
For Feature Tests, the variable values for the variation represented as a map of Variable keys to their values. |
variations[].status |
String | No |
Current status of the variation Valid values:
|
variations[].weight |
Integer | Yes |
The percentage of your visitors that should see this variation, measured in basis points. 100 basis points = 1% traffic. Variation weights must add up to 10000. |
variations[].variation_id |
Integer | No |
The unique identifier for the variation |
archived |
Boolean | No |
Whether or not the Section has been archived Default value: false |
description |
String | No |
A short description of this Section |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.