Orishare
API reference
GET
/experiment_templates

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/experiment_templates"
{  "data": [    {      "key": "holdout",      "name": "string",      "description": "string",      "primary_metric": "retained_d1",      "goal_event": "string",      "goal_value_property": "string",      "default_holdout_percent": 0,      "variants": [        {          "key": "string",          "name": "string",          "receives_targets": true        }      ],      "target": {        "type": "program",        "program_kinds": [          "string"        ]      }    }  ]}
GET
/experiments

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/experiments"
{  "data": [    {      "id": "string",      "key": "string",      "name": "string",      "description": "string",      "status": "draft",      "variants": [        {          "key": "string",          "name": "string",          "weight_bps": 1,          "targets": [            {              "type": "rule",              "key": "string"            }          ]        }      ],      "goal_event": "string",      "goal_value_property": "string",      "winner_variant": "string",      "audience": {        "segment": "string"      },      "started_at": "2019-08-24T14:15:22Z",      "ended_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/experiments

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/experiments" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "key": "streak-holdout",    "name": "Daily streak holdout",    "template": "holdout",    "holdout_percent": 10,    "targets": [      {        "type": "program",        "key": "daily-streak"      }    ],    "goal_event": "purchase"  }'
{  "id": "string",  "key": "string",  "name": "string",  "description": "string",  "status": "draft",  "variants": [    {      "key": "string",      "name": "string",      "weight_bps": 1,      "targets": [        {          "type": "rule",          "key": "string"        }      ]    }  ],  "goal_event": "string",  "goal_value_property": "string",  "winner_variant": "string",  "audience": {    "segment": "string"  },  "started_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/experiments/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/experiments/string"
{  "id": "string",  "key": "string",  "name": "string",  "description": "string",  "status": "draft",  "variants": [    {      "key": "string",      "name": "string",      "weight_bps": 1,      "targets": [        {          "type": "rule",          "key": "string"        }      ]    }  ],  "goal_event": "string",  "goal_value_property": "string",  "winner_variant": "string",  "audience": {    "segment": "string"  },  "started_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/experiments/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/experiments/string" \  -H "Content-Type: application/json" \  -d '{    "name": "Daily streak holdout"  }'
{  "id": "string",  "key": "string",  "name": "string",  "description": "string",  "status": "draft",  "variants": [    {      "key": "string",      "name": "string",      "weight_bps": 1,      "targets": [        {          "type": "rule",          "key": "string"        }      ]    }  ],  "goal_event": "string",  "goal_value_property": "string",  "winner_variant": "string",  "audience": {    "segment": "string"  },  "started_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE
/experiments/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/experiments/string"
Empty
POST
/experiments/{id}/start

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/experiments/string/start" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "key": "string",  "name": "string",  "description": "string",  "status": "draft",  "variants": [    {      "key": "string",      "name": "string",      "weight_bps": 1,      "targets": [        {          "type": "rule",          "key": "string"        }      ]    }  ],  "goal_event": "string",  "goal_value_property": "string",  "winner_variant": "string",  "audience": {    "segment": "string"  },  "started_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/experiments/{id}/end

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/experiments/string/end" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "winner_variant": "treatment"  }'
{  "id": "string",  "key": "string",  "name": "string",  "description": "string",  "status": "draft",  "variants": [    {      "key": "string",      "name": "string",      "weight_bps": 1,      "targets": [        {          "type": "rule",          "key": "string"        }      ]    }  ],  "goal_event": "string",  "goal_value_property": "string",  "winner_variant": "string",  "audience": {    "segment": "string"  },  "started_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/experiments/{id}/results

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/experiments/string/results"
{  "experiment_id": "string",  "computed_at": "2019-08-24T14:15:22Z",  "sample_ratio": {    "p_value": 0,    "mismatch": true  },  "variants": [    {      "key": "string",      "is_control": true,      "units": -9007199254740991,      "metrics": [        {          "metric": "retained_d1",          "units": -9007199254740991,          "value": 0,          "ci_low": 0,          "ci_high": 0,          "mature": true,          "comparison": {            "absolute_lift": 0,            "relative_lift": 0,            "ci_low": 0,            "ci_high": 0,            "p_value": 0,            "significant": true          }        }      ]    }  ]}
GET
/customers/{id}/experiments

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/customers/string/experiments"
{  "data": [    {      "experiment_key": "string",      "variant_key": "string"    }  ]}