Creates a test.
Debugging
Request headers
This operation uses only the common request headers. For more information, see Common request parameters.
Request syntax
POST /v4/openapi/app-groups/[appGroupIdentity]/scenes/[sceneId]/groups/[groupId]/experiments HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
appGroupIdentity | String | Path | Yes | my_app_group_name |
The name of the application. |
groupId | Integer | Path | Yes | 13467 |
The ID of the test group. |
sceneId | Integer | Path | Yes | 20404 |
The ID of the test scenario. |
Parameter |
Type |
Required |
Example |
Description |
---|---|---|---|---|
name |
String |
Yes |
"my_test" |
The name of the test. |
traffic |
Integer |
Yes |
30 |
The percentage of traffic that is routed to the test. |
online |
Boolean |
Yes |
true |
Specifies whether the test takes effect. |
params |
Object |
Yes |
The parameters of the test. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
requestId | String | D77D0DAF-790D-F5F5-A9C0-133738165014 |
The ID of the request. |
result | Struct |
The details of the test. |
|
created | Integer | 0 |
The time when the test was created. |
id | String | 12889 |
The ID of the test. |
name | String | test3 |
The name of the test. |
online | Boolean | true |
The status of the test. Valid values:
|
params | Map | {"firstFormulaName": "default"} |
The parameters of the test. |
traffic | Integer | 30 |
The percentage of traffic that is routed to the test. |
updated | Integer | 1589017861 |
The time when the test was last modified. |
Examples
Sample requests
POST /v4/openapi/app-groups/my_app_group_name/scenes/20404/groups/13467/experiments
{
"name": "test1",
"traffic": 30,
"online": true,
"params": {
"firstFormulaName": "default"
}
}
Sample success responses
XML
format
<result>
<created>0</created>
<name>test3</name>
<online>true</online>
<id>12889</id>
<params>
<firstFormulaName>default</firstFormulaName>
</params>
<updated>1589017861</updated>
<traffic>30</traffic>
</result>
<requestId>D77D0DAF-790D-F5F5-A9C0-133738165014</requestId>
JSON
format
{
"result": {
"created": 0,
"name": "test3",
"online": true,
"id": 12889,
"params":{
"firstFormulaName":"default"
},
"updated": 1589017861,
"traffic": 30
},
"requestId": "D77D0DAF-790D-F5F5-A9C0-133738165014"
}
Error codes
For a list of error codes, visit the API Error Center.