Run experiment - maulitta/utm_checker Wiki

Description:

Run experiment for given organization and return ab-branch and percent. The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties.

HTTP request:

POST /v1/experiments/run

Request headers:

Header Value
optional Content-Type application/json
required Authorization Bearer token
required Organization-ID Organization_uid

Request body:

In the request body, supply the JSON:API document with experiment_uid that should be run.

Parameter Type Description
type string JSON-api resource's type representation. Allowed value experiment.
experiment_uid string The ab-tower experiment uid.
example:
{
  "data": {
    "type": "experiment",
    "attributes": {
      "experiment_uid": "test"
    }
  }
}

Response:

If successful, this method returns 200 Created response code and experiment object in the response body.

Expample

Request

Here is an example of the request:

POST https://graph.microsoft.com/v1.0/users
Content-type: application/json

{
  "data": {
    "type": "experiment",
    "attributes": {
      "experiment_uid": "test"
    }
  }
}

Response

Here is an example of the response. Note: The response object shown here might be shortened for readability:

HTTP/1.1 200 OK
Content-type: application/json

{
	"data": {
		"type": "experiment",
		"id": "08C3BE77-4268-0000-0000EE45",
		"attributes": {
			"branch": "original",
			"experiment_uid": "bot-scopes",
			"uid": "94077000-0000-0000-0000D981"
		},
		"relationships": {
			"branches": {
				"data": {
					"type": "branches",
					"id": "F44C0000-0000-0000-000092EC"
				}
			},
			"organizations": {
				"data": {
					"type": "organizations",
					"id": "94077000-0000-0000-0000D981"
				}
			}
		},
		"meta": {
			"source": "blacklist"
		}
	},
	"included": [
		{
			"type": "branches",
			"id": "F44C0000-0000-0000-000092EC",
			"attributes": {
				"uid": "original",
				"name": "Original",
				"percent": 100,
				"version": "1",
				"feature_flagging": ""
			}
		},
		{
			"type": "organizations",
			"id": "94077000-0000-0000-0000D981",
			"attributes": {
				"id": "94077000-0000-0000-0000D981",
				"subdomain": "autotestsheadorganization",
				"name": "",
				"status": "FINISHED",
				"paywall_status": "FREE",
				"category": null,
				"size": null,
				"auto_generated": 0,
				"is_demo": 0,
				"created_at": "2018-12-06 16:54:09",
				"updated_at": "2018-12-06 16:54:09",
				"logo_profile": null,
				"logo_rectangle": null
			}
		}
	]
}
⚠️ **GitHub.com Fallback** ⚠️