AbTests resource (Data API 23.2)
Summary
Http Method | Resource | Description |
---|---|---|
PUT | /sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/promotions/{promotion_id} | Action to bind a single promotion to a given abTest. |
DELETE | /sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/promotions/{promotion_id} | Action to unbind one promotions from a given abTest. |
PUT | /sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/slot_configurations/{slot_id}/{slot_config_id} | Action to bind a slot configuration to a given abTest. |
DELETE | /sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/slot_configurations/{slot_id}/{slot_config_id} | Action to unbind a slot configuration from a given abTest. |
PUT | /sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/sorting_rules/{sorting_rule_id}/{category_id} | Action to bind a single sorting rule to a given abTest. |
DELETE | /sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/sorting_rules/{sorting_rule_id}/{category_id} | Action to unbind a single sorting rule from a given abTest. |
GET | /sites/{site_id}/ab_tests/{id} | Action to get an A/B Test information. |
PUT | /sites/{site_id}/ab_tests/{id} | Creates an A/B Test using the information provided. If an A/B Test with the same unique identifier exists, it will be deleted and a new one will be created unless the header x-dw-validate-existing=true is passed in with the request. |
DELETE | /sites/{site_id}/ab_tests/{id} | Deletes the A/B Test by ID |
PATCH | /sites/{site_id}/ab_tests/{id} | Updates the A/B Test with the specified information. |
GET | /sites/{site_id}/ab_tests/{id}/segments/{segment_id} | Gets an A/B Test segment using the information provided. |
PUT | /sites/{site_id}/ab_tests/{id}/segments/{segment_id} | Creates an A/B Test segment using the information provided. |
DELETE | /sites/{site_id}/ab_tests/{id}/segments/{segment_id} | Deletes the A/B Test Segment by ID |
PATCH | /sites/{site_id}/ab_tests/{id}/segments/{segment_id} | Updates the A/B Test segment with the specified information. |
Bind Promotion to A/B Test
Action to bind a single promotion to a given abTest.Url
PUT https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/promotions/{promotion_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
ab_test_id | String | The ID of the abTest which contains the segment. | minLength=1 |
promotion_id | String | The ID of the promotion that is to be assigned to the abTest. | minLength=1 |
segment_id | String | The ID of the segment to to which the promotion is to be assigned. | minLength=1 |
site_id | String | The ID of the site that contains the abTest and promotion. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Indicates that the abTest with the given abTest ID is not found. |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
thrown when the segment with the given id is not found. |
404 | PromotionNotFoundException |
promotionId (String) siteId (String) |
Indicates that the promotion with the given promotion ID is not found. |
404 | SiteNotFoundException |
siteId (String) |
thrown when the site with the given id is not found. |
Sample
REQUEST:
PUT /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/segments/my-segment/promotions/my-promo HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesSegmentNotFoundException",
"message":"No segment with ID 'my-segment' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"PromotionNotFoundException",
"message":"No promotion with ID 'my-promo' for site 'SiteGenesis' was found."
}
}
Unbind Promotions
Action to unbind one promotions from a given abTest.Url
DELETE https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/promotions/{promotion_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
ab_test_id | String | The abTest ID that promotions are to be unbound from | minLength=1 |
promotion_id | String | The ID of the promotion that is to be assigned to the abTest. | minLength=1 |
segment_id | String | the segment to bind to | minLength=1 |
site_id | String | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Indicates that the abTest with the given abTest ID is not found. |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
thrown when the segment with the given id is not found. |
404 | PromotionNotFoundException |
promotionId (String) siteId (String) |
thrown when promotion is not found for one of the specified promotion ids. |
404 | SiteNotFoundException |
siteId (String) |
thrown when the site with the given id is not found. |
Sample
REQUEST:
DELETE /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/segments/my-segment/promotions/my-promo HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesSegmentNotFoundException",
"message":"No segment with ID 'my-segment' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"PromotionNotFoundException",
"message":"No promotion with ID 'my-promo' for site 'SiteGenesis' was found."
}
}
Bind Slot Configuration
Action to bind a slot configuration to a given abTest.Url
PUT https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/slot_configurations/{slot_id}/{slot_config_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
ab_test_id | String | The id of the abTest | minLength=1 |
segment_id | String | minLength=1 | |
site_id | String | The id of the site | minLength=1 |
slot_config_id | String | The id of the slot configuration | minLength=1 |
slot_id | String | The of the slot | minLength=1 |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
context | String | The context string, which consists of three parts: the context type (which must be folder, category or global), an equals sign (=), and the context id (either the category id or folder id). If you do not set this query parameter, the global context is used by default. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 | InvalidContextTypeException |
contextType (String) |
Indicates the slot context type is not one of "global", "category", or "folder" |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Indicates that the abTest with the given abTest ID is not found. |
404 | SlotWithContextTypeNotFoundException |
slotId (String) contextType (String) siteId (String) |
Indicates that the slot with the given slot ID and context type is not found. |
404 | SlotConfigurationIdentifierNotFoundException |
siteId (String) slotId (String) slotConfigurationId (String) contextType (Enum {global, category, folder}) contextId (String) |
Indicates that the slot with the given slot ID, slot configuration ID and context type is not found. |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
thrown when the segment with the given id is not found. |
404 | SiteNotFoundException |
siteId (String) |
thrown when the site with the given id is not found. |
Sample
REQUEST:
PUT /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/segments/my-segment/slot_configurations/my-slot1/my-slot-config2?context=category=my-category1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesSegmentNotFoundException",
"message":"No segment with ID 'my-segment' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"SlotWithContextTypeNotFoundException",
"message":"No slot with ID 'my-slot' and context type 'CATEGORY' for site 'SiteGenesis' was found."
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"SlotConfigurationIdentifierNotFoundException",
"message":"No slot configuration with ID 'my-slot-config2', slot id 'my-slot', context type 'CATEGORY', and context id '' for site 'SiteGenesis' was found."
}
}
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"InvalidContextTypeException",
"message":"'invalid' is not a valid context."
}
}
Unbind Slot Configuration
Action to unbind a slot configuration from a given abTest.Url
DELETE https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/slot_configurations/{slot_id}/{slot_config_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
ab_test_id | String | The id of the abTest | minLength=1 |
segment_id | String | minLength=1 | |
site_id | String | The id of the site | minLength=1 |
slot_config_id | String | The id of the slot configuration | minLength=1 |
slot_id | String | The of the slot | minLength=1 |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
context | String | The context string, which consists of three parts: the context type (which must be folder, category or global), an equals sign (=), and the context id (either the category id or folder id). | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 | InvalidContextTypeException |
contextType (String) |
Indicates the slot context type is not one of "global", "category", or "folder" |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Indicates that the abTest with the given abTest ID is not found. |
404 | SlotWithContextTypeNotFoundException |
slotId (String) contextType (String) siteId (String) |
Indicates that the slot with the given slot ID and context type is not found. |
404 | SlotConfigurationIdentifierNotFoundException |
siteId (String) slotId (String) slotConfigurationId (String) contextType (Enum {global, category, folder}) contextId (String) |
Indicates that the slot with the given slot ID, slot configuration ID and context type is not found. |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
thrown when the segment with the given id is not found. |
404 | SiteNotFoundException |
siteId (String) |
thrown when the site with the given id is not found. |
Sample
REQUEST:
DELETE /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/segments/my-segment/slot_configurations/my-slot1/my-slot-config2?context=category=my-category1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesSegmentNotFoundException",
"message":"No segment with ID 'my-segment' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"SlotWithContextTypeNotFoundException",
"message":"No slot with ID 'my-slot' and context type 'CATEGORY' for site 'SiteGenesis' was found."
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"SlotConfigurationIdentifierNotFoundException",
"message":"No slot configuration with ID 'my-slot-config2', slot id 'my-slot', context type 'CATEGORY', and context id '' for site 'SiteGenesis' was found."
}
}
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"InvalidContextTypeException",
"message":"'invalid' is not a valid context."
}
}
Bind SortingRule to A/B Test
Action to bind a single sorting rule to a given abTest.Url
PUT https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/sorting_rules/{sorting_rule_id}/{category_id}?rule_context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
ab_test_id | String | The ID of the abTest to which the sorting rule is to be assigned. | minLength=1 |
category_id | String | The ID of the category that is associated with the sorting rule. | minLength=1 |
segment_id | String | minLength=1 | |
site_id | String | The ID of the site that contains the abTest, sorting rule and category. | minLength=1 |
sorting_rule_id | String | The ID of sorting rule that is to be assigned to the abTest. | minLength=1 |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
rule_context | String | the optional context of the sorting rule, either "site" (default) or "global" | strings=["global", "site"] |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 | InvalidCategoryException |
categoryId (String) |
Indicates that the category with the given category ID is not found. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Indicates that the abTest with the given abTest ID is not found. |
404 | SortingRuleNotFoundException |
sortingRuleId (String) siteId (String) |
Indicates that the sorting rule with the given sorting rule ID is not found. |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
thrown when the segment with the given id is not found. |
404 | SiteNotFoundException |
siteId (String) |
thrown when the site with the given id is not found. |
409 | SortingRuleCampaignAssignConflictException |
sortingRuleId (String) campaignId (String) categoryId (String) existingSortingRuleId (String) |
Indicates that there is a sorting rule already assigned to the given abTest ID and category ID. The sorting rule with the given sorting rule ID cannot be assigned to the same abTest ID and category ID. |
Sample
REQUEST:
PUT /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/groups/my-group/sorting_rules/my-rule/category?rule-context=site HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesGroupNotFoundException",
"message":"No group with ID 'my-group' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"SortingRuleNotFoundException",
"message":"No sorting rule with ID 'my-rule' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"InvalidCategoryException",
"message":"The specified category with ID 'category1.1' is invalid."
}
}
Unbind SortingRule
Action to unbind a single sorting rule from a given abTest.Url
DELETE https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{ab_test_id}/segments/{segment_id}/sorting_rules/{sorting_rule_id}/{category_id}?rule_context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
ab_test_id | String | The ID of the abTest to which the sorting rule is to be assigned. | minLength=1 |
category_id | String | The ID of the category that is associated with the sorting rule. | minLength=1 |
segment_id | String | minLength=1 | |
site_id | String | The ID of the site that contains the abTest, sorting rule and category. | minLength=1 |
sorting_rule_id | String | The ID of sorting rule that is to be assigned to the abTest. | minLength=1 |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
rule_context | String | the optional context of the sorting rule, either "site" (default) or "global" | strings=["global", "site"] |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 | InvalidCategoryException |
categoryId (String) |
Indicates that the category with the given category ID is not found. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Indicates that the abTest with the given abTest ID is not found. |
404 | SortingRuleNotFoundException |
sortingRuleId (String) siteId (String) |
Indicates that the sorting rule with the given sorting rule ID is not found. |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
thrown when the segment with the given id is not found. |
404 | SiteNotFoundException |
siteId (String) |
thrown when the site with the given id is not found. |
Sample
REQUEST:
DELETE /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/groups/my-group/sorting_rules/my-rule/category?rule-context=site HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesGroupNotFoundException",
"message":"No group with ID 'my-group' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"SortingRuleNotFoundException",
"message":"No sorting rule with ID 'my-rule' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"InvalidCategoryException",
"message":"The specified category with ID 'category1.1' is invalid."
}
}
Get an A/B Test
Action to get an A/B Test information.Url
GET https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}?expand={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
expand | String | The expand parameter. A comma separated list with the allowed values (stats, promotions, sorting_rules, slot_configs) |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
Sample
REQUEST:
GET /s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Aug-2014 00:00:00 GMT
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "ab_test",
"customer_groups" :
[
"abtest_customer_group"
],
"description" : "abtest description",
"email_addresses" :
[
"[email protected]"
],
"enabled" : true,
"end_date" : "2015-07-31T23:09:08.000Z",
"expiration_type" : "session",
"id" : "my-abtest",
"key_metric_id" : "abtest_key_metric_id",
"link" : "https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest",
"paused" : true,
"start_date" : "2015-04-01T11:30:15.000Z",
"tags" :
[
"abtest_tag"
],
"test_groups" :
[
{
"_type" : "ab_test_group",
"allocation" : 20,
"custom_experience" : false,
"id" : "Control"
},
{
"_type" : "ab_test_group",
"allocation" : 40,
"custom_experience" : false,
"description" : "A description",
"id" : "Test Segment A"
},
{
"_type" : "ab_test_group",
"allocation" : 40,
"custom_experience" : false,
"id" : "Test Segment B"
}
],
"trigger" :
{
"_type" : "ab_test_trigger",
"is_pipeline_based" : false,
"trigger_type" : "immediately"
}
}
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
Creates an A/B Test
Creates an A/B Test using the information provided. If an A/B Test with the same unique identifier exists, it will be deleted and a new one will be created unless the header x-dw-validate-existing=true is passed in with the request.Url
PUT https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, maxLength=40, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 | ABTestInvalidEmailException |
email (String) abtestId (String) |
Thrown if an invalid email is specified. |
400 | ABTestInvalidPipelineException |
pipeline (String) abtestId (String) |
Thrown if an invalid pipeline is specified. |
400 | ABTestInvalidTriggerException |
missingProperty (String) triggerType (String) abTestId (String) |
Thrown if there is missing pipline_call or categories in the specified trigger of type pipeline_call or category_view_page respectively. |
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
409 | ABTestDuplicateException |
abtestId (String) |
If an A/B Test exists already in the site with the given identifier and the header x-dw-validate-existing=true is passed in with the request. |
Sample
REQUEST:
PUT /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
"customer_groups" :
[
"abtest_customer_group"
],
"description" : "abtest description",
"email_addresses" :
[
"[email protected]"
],
"enabled" : true,
"end_date" : "2015-07-31T23:09:08.000Z",
"expiration_type" : "session",
"key_metric_id" : "abtest_key_metric_id",
"paused" : true,
"start_date" : "2015-04-01T11:30:15.000Z",
"tags" :
[
"abtest_tag"
],
"trigger" :
{
"is_pipeline_based" : false,
"trigger_type" : "immediately"
}
}
# in case of success:
RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Location: https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest
Content-Type: application/json; charset=UTF-8
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "ab_test",
"customer_groups" :
[
"abtest_customer_group"
],
"description" : "abtest description",
"email_addresses" :
[
"[email protected]"
],
"enabled" : true,
"end_date" : "2015-07-31T23:09:08.000Z",
"expiration_type" : "session",
"id" : "my-abtest",
"key_metric_id" : "abtest_key_metric_id",
"link" : "https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest",
"paused" : true,
"start_date" : "2015-04-01T11:30:15.000Z",
"tags" :
[
"abtest_tag"
],
"test_groups" :
[
{
"_type" : "ab_test_group",
"allocation" : 20,
"custom_experience" : false,
"id" : "Control"
},
{
"_type" : "ab_test_group",
"allocation" : 40,
"custom_experience" : false,
"description" : "A description",
"id" : "Test Segment A"
},
{
"_type" : "ab_test_group",
"allocation" : 40,
"custom_experience" : false,
"id" : "Test Segment B"
}
],
"trigger" :
{
"_type" : "ab_test_trigger",
"is_pipeline_based" : false,
"trigger_type" : "immediately"
}
}
# in case of failure:
RESPONSE:
HTTP/1.1 409 Conflict
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestDuplicateException",
"message":"The A/B test could not be created or updated because of duplicate ID 'my-abtest'."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestInvalidEmailException",
"message":"The email '[email protected]' specified for A/B test with ID 'my-abtest' is invalid.
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestInvalidPipelineException",
"message":"The pipeline 'hello' specified for A/B test with ID 'my-abtest' is invalid."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestInvalidTriggerException",
"message":"'pipeline' is missing for trigger type 'PIPELINE_CALL' specified for A/B test with ID my-test'."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"StartAfterEndException",
"message":"The start date '2015-04-01T11:30:15.000Z' is after the end date '2015-02-01T11:30:15.000Z' for 'ab_test' with ID 'my-test'."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestInvalidDateException",
"message":"The A/B test with ID ''my-test' and 'end date' '2015-02-01T11:30:15.000Z' could not be created. Please specify both the start date and the end date."
}
}
Delete A/B Test
Deletes the A/B Test by IDUrl
DELETE https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
Sample
REQUEST:
DELETE /s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
Update an A/B Test
Updates the A/B Test with the specified information.Url
PATCH https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 | ABTestInvalidEmailException |
email (String) abtestId (String) |
Thrown if an invalid email is specified. |
400 | ABTestInvalidPipelineException |
pipeline (String) abtestId (String) |
Thrown if an invalid pipeline is specified. |
400 | ABTestInvalidTriggerException |
missingProperty (String) triggerType (String) abTestId (String) |
Thrown if there is missing pipline_call or categories in the specified trigger of type pipeline_call or category_view_page respectively. |
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
409 | ABTestDuplicateException |
abtestId (String) |
Thrown if an A/B Test exists already in the site with the given identifier specified in the body that is different from the identifier in the path. |
Sample
REQUEST:
PATCH /s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
"_resource_state" : "847f9c3c5867f641470b3046aeec31f07757991b792d722e10079926f7a289fb",
"customer_groups" :
[
"abtest_customer_group"
],
"description" : "abtest description",
"email_addresses" :
[
"[email protected]"
],
"enabled" : true,
"end_date" : "2015-07-31T23:09:08.000Z",
"expiration_type" : "session",
"id" : "my-abtest",
"key_metric_id" : "abtest_key_metric_id",
"paused" : true,
"start_date" : "2015-04-01T11:30:15.000Z",
"tags" :
[
"abtest_tag"
],
"trigger" :
{
"is_pipeline_based" : false,
"trigger_type" : "immediately"
}
}
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "ab_test",
"customer_groups" :
[
"abtest_customer_group"
],
"description" : "abtest description",
"email_addresses" :
[
"[email protected]"
],
"enabled" : true,
"end_date" : "2015-07-31T23:09:08.000Z",
"expiration_type" : "session",
"id" : "my-abtest",
"key_metric_id" : "abtest_key_metric_id",
"link" : "https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest",
"paused" : true,
"start_date" : "2015-04-01T11:30:15.000Z",
"tags" :
[
"abtest_tag"
],
"test_groups" :
[
{
"_type" : "ab_test_group",
"allocation" : 20,
"custom_experience" : false,
"id" : "Control"
},
{
"_type" : "ab_test_group",
"allocation" : 40,
"custom_experience" : false,
"description" : "A description",
"id" : "Test Segment A"
},
{
"_type" : "ab_test_group",
"allocation" : 40,
"custom_experience" : false,
"id" : "Test Segment B"
}
],
"trigger" :
{
"_type" : "ab_test_trigger",
"is_pipeline_based" : false,
"trigger_type" : "immediately"
}
}
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 409 Conflict
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestDuplicateException",
"message":"The A/B test could not be created or updated because of duplicate ID 'my-abtest'."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestInvalidEmailException",
"message":"The email '[email protected]' specified for A/B test with ID 'my-abtest' is invalid.
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestInvalidPipelineException",
"message":"The pipeline 'hello' specified for A/B test with ID 'my-abtest' is invalid."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestInvalidTriggerException",
"message":"'pipeline' is missing for trigger type 'PIPELINE_CALL' specified for A/B test with ID my-test'."
}
}
RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"StartAfterEndException",
"message":"The start date '2015-04-01T11:30:15.000Z' is after the end date '2015-02-01T11:30:15.000Z' for 'ab_test' with ID 'my-test'."
}
}
Get A/B Test Segment
Gets an A/B Test segment using the information provided.Url
GET https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}/segments/{segment_id}?expand={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, minLength=1, nullable=false |
segment_id | String | The id of the segment in the test. | mandatory=true, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
expand | String | The expand parameter. A comma separated list with the allowed values (stats, promotions, sorting_rules, slot_configs) |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
Thrown if the segment cannot be found in the A/B Test provided |
Sample
REQUEST:
GET /s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest/segments/my-segment HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Aug-2014 00:00:00 GMT
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "ab_test",
"customer_groups" :
[
"abtest_customer_group"
],
"description" : "abtest description",
"email_addresses" :
[
"[email protected]"
],
"enabled" : true,
"end_date" : "2015-07-31T23:09:08.000Z",
"expiration_type" : "session",
"id" : "my-abtest",
"key_metric_id" : "abtest_key_metric_id",
"link" : "https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest",
"paused" : true,
"start_date" : "2015-04-01T11:30:15.000Z",
"tags" :
[
"abtest_tag"
],
"test_segments" :
[
{
"_type" : "ab_test_segment",
"allocation" : 20,
"custom_experience" : false,
"id" : "Control"
},
{
"_type" : "ab_test_segment",
"allocation" : 40,
"custom_experience" : false,
"description" : "A description",
"id" : "Test Segment A"
},
{
"_type" : "ab_test_segment",
"allocation" : 40,
"custom_experience" : false,
"id" : "Test Segment B"
}
],
"trigger" :
{
"_type" : "ab_test_trigger",
"is_pipeline_based" : false,
"trigger_type" : "immediately"
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesSegmentNotFoundException",
"message":"No segment with ID 'my-segment' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
Creates an A/B Test Segment
Creates an A/B Test segment using the information provided.Url
PUT https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}/segments/{segment_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, minLength=1, nullable=false |
segment_id | String | The id of the segment in the test. | mandatory=true, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
Thrown if the segment cannot be found in the A/B Test provided |
Sample
REQUEST:
PUT /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/segments/my-segment HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
"description" : "segment description",
"allocation": 40,
"custom_experience": false
}
# in case of success:
RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Location: https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest
Content-Type: application/json; charset=UTF-8
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "ab_test_segment",
"allocation": 40,
"custom_experience": false
"description" : "segment description",
"id" : "my-segment",
"link" : "https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest/segments/my-segment",
}
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
Delete A/B Test Segment
Deletes the A/B Test Segment by IDUrl
DELETE https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}/segments/{segment_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, minLength=1, nullable=false |
segment_id | String | The id of the segment in the test. | mandatory=true, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
Thrown if the segment cannot be found in the A/B Test provided |
Sample
REQUEST:
DELETE /s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest/segments/my-segment HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesSegmentNotFoundException",
"message":"No segment with ID 'my-segment' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}
Update A/B Test Segment
Updates the A/B Test segment with the specified information.Url
PATCH https://hostname:port/dw/data/v23_2/sites/{site_id}/ab_tests/{id}/segments/{segment_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested A/B Test. | mandatory=true, minLength=1, nullable=false |
segment_id | String | The id of the segment in the test. | mandatory=true, minLength=1, nullable=false |
site_id | String | ID of the site that the A/B tests are contained within. | mandatory=true, maxLength=256, minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 | SiteNotFoundException |
siteId (String) |
Indicates that site specified with the given id is unknown. |
404 | ABTestNotFoundException |
abtestId (String) siteId (String) |
Thrown in case the A/B Test does not exist matching the given id |
404 | ABTestSegmentNotFoundException |
abtestId (String) abTestSegmentId (String) siteId (String) |
Thrown if the segment cannot be found in the A/B Test provided |
Sample
REQUEST:
PATCH /s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest/segments/my-segment HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
"description" : "modified description",
"allocation": 10
}
# in case of success:
RESPONSE:
HTTP/1.1 200 SUCCESS
Content-Length: 67
Location: https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/abtests/my-abtest
Content-Type: application/json; charset=UTF-8
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "ab_test_segment",
"allocation": 10,
"description" : "modified description",
"id" : "my-segment",
"link" : "https://example.com/s/-/dw/data/v23_2/sites/SiteGenesis/ab_tests/my-abtest/segments/my-segment",
}
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTestNotFoundException",
"message":"No ab_test with ID 'my-abtest' for site 'SiteGenesis' was found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "23.2",
"fault":{
"type":"ABTesSegmentNotFoundException",
"message":"No segment with ID 'my-segment' in A/B test 'my-abtest' for site 'SiteGenesis' was found."
}
}