AbTestSearch resource (Data API 19.1)

Summary

Http Method Resource Description
POST /sites/{site_id}/ab_test_search

Searches for A/B Tests.

The query attribute specifies a complex query that can be used to narrow down the search. This is the list of searchable attributes:

  • id - String
  • description - String
  • enabled - Boolean
  • paused - Boolean
  • key_metric_id - String
  • email_addresses - String
  • tags- String
  • expiration_type - String enum[session, never]
  • start_date - DateTime
  • end_date - DateTime

These fields can only be used in Queries as conjunctions (using AND). If the field is used in a disjunction (OR) an exception will be thrown.

The output of the query can also be sorted. These are the list of sortable attributes:

  • id - String
  • description - String
  • enabled - Boolean
  • paused - Boolean
  • key_metric_id - String

A/B Test Search

Searches for A/B Tests.

The query attribute specifies a complex query that can be used to narrow down the search. This is the list of searchable attributes:

These fields can only be used in Queries as conjunctions (using AND). If the field is used in a disjunction (OR) an exception will be thrown.

The output of the query can also be sorted. These are the list of sortable attributes:

Url

POST https://hostname:port/dw/data/v19_1/sites/{site_id}/ab_test_search

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

SearchRequest

Response Document

AbTestSearchResult

Path Parameters

Parameter Type Description Constraints
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.

Sample

REQUEST:
POST /s/-/dw/data/v19_1/sites/SiteGenesis/ab_test_search HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Accept: application/json

{
    "query" : {
        "text_query": {
            "field": ["id", "description"],
            "search_phrase": "my"
        }
    },
    "select" : "(**)"
}

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8

{
  "_v" : "19.1",
   "_type" : "ab_test_search_result",
  "count" : 2,
  "hits" : [
    {
       "_type" : "ab_test",
       "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
       "customer_groups" : 
       [
          "abtest_customer_group"
       ],
       "description" : "my abtest1 description",
       "email_addresses" : 
       [
          "[email protected]"
       ],
       "enabled" : true,
       "end_date" : "2015-07-31T23:09:08.000Z",
       "expiration_type" : "session",
       "id" : "my-abtest1",
       "key_metric_id" : "abtest_key_metric_id",
       "link" : "https://example.com/s/-/dw/data/v19_1/sites/SiteGenesis/ab_tests/my-abtest1",
       "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"
       }    
    },
    {
       "_type" : "ab_test",
       "_resource_state":"vuewe938djd9c8j390fc34",
       "customer_groups" : 
       [
          "abtest_customer_group"
       ],
       "description" : "my abtest2 description",
       "email_addresses" : 
       [
          "[email protected]"
       ],
       "enabled" : true,
       "end_date" : "2015-07-31T23:09:08.000Z",
       "expiration_type" : "session",
       "id" : "my-abtest2",
       "key_metric_id" : "abtest_key_metric_id",
       "link" : "https://example.com/s/-/dw/data/v19_1/sites/SiteGenesis/ab_tests/my-abtest2",
       "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" : 80,
             "custom_experience" : false,
             "id" : "Test Segment B"
          }
       ],   
       "trigger" : 
       {
          "_type" : "ab_test_trigger",
          "is_pipeline_based" : true,
          "trigger_type" : "pipeline_call",
          "pipeline_calls" :
          [
              "My-Pipeline"
          ]
       }
    },
    {
       "_type" : "ab_test",
       "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
       "customer_groups" : 
       [
          "abtest_customer_group"
       ],
       "description" : "my abtest3 description",
       "email_addresses" : 
       [
          "[email protected]"
       ],
       "enabled" : true,
       "end_date" : "2015-07-31T23:09:08.000Z",
       "expiration_type" : "session",
       "id" : "my-abtest3",
       "key_metric_id" : "abtest_key_metric_id",
       "link" : "https://example.com/s/-/dw/data/v19_1/sites/SiteGenesis/ab_tests/my-abtest3",
       "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" : 50,
             "custom_experience" : false,
             "description" : "A description",
             "id" : "Test Segment A"
          },
          {
             "_type" : "ab_test_group",
             "allocation" : 30,
             "custom_experience" : false,
             "id" : "Test Segment B"
          }
       ],       
       "trigger" : 
       {
          "_type" : "ab_test_trigger",
          "is_pipeline_based" : true,
          "trigger_type" : "home_page_view",
          "pipeline_calls" :
          [
              "Home-Show",
              "Default-Start"
          ]
       }
    },
    {
       "_type" : "ab_test",
       "_resource_state" : "045f07bb655171dc37d8eb8bf4b0db7ac1fb3a160002eb96fbe6e2f95aa4b6cc",
       "customer_groups" : 
       [
          "abtest_customer_group"
       ],
       "description" : "my abtest4 description",
       "email_addresses" : 
       [
          "[email protected]"
       ],
       "enabled" : true,
       "end_date" : "2015-07-31T23:09:08.000Z",
       "expiration_type" : "session",
       "id" : "my-abtest4",
       "key_metric_id" : "abtest_key_metric_id",
       "link" : "https://example.com/s/-/dw/data/v19_1/sites/SiteGenesis/ab_tests/my-abtest4",
       "paused" : true,
       "start_date" : "2015-04-01T11:30:15.000Z",
       "tags" : 
       [
          "abtest_tag"
       ],
       "test_groups" : 
       [
          {
             "_type" : "ab_test_group",
             "allocation" : 0,
             "custom_experience" : false,
             "id" : "Control"
          }
       ],   
       "trigger" : 
       {
          "_type" : "ab_test_trigger",
          "categories" :
          [
              "root"
          ]
          "is_pipeline_based" : true,
          "trigger_type" : "category_page_view",
          "pipeline_calls" :
          [
              "Search-Show?cgid=root"
          ]
       }
    }
  ],
  "query" : { "text_query": { "fields": ["id", "description"], "search_phrase": "my" } },
  "select": "**",
  "start" : 0,
  "total" : 4
}