...
Design Flow :
Experiment API :
CREATE
...
API :
URL : POST /experiment/create
...
Code Block | ||||
---|---|---|---|---|
| ||||
"request": { "expId": "U1234", // Unique Id for Experiment "name": "USER_ORG", // Name for Experiment "createdBy": "User1", // Name of the user who created this experiment "description": "Experiment to get users with orgname = sunbird", // Short Description about the experiment "criteria": { // Criteria for the Experiment "type": "user", // Type of the Criteria "filters": { // Array of Filters Criteria with User Filter field Name and List of Values "organisations.orgName": ["sunbird"] // List of Values } }, "data" : { // Experiment Data "startDate" : "2019-08-01", // Start date of the Experiment "endDate" : "2019-08-02", // End date of the Experiment "key" : "/org/profile" // Experiment Key } } |
...
- Process the request and save the request parameters to Experiment-Definition Cassandra Table with status "SUBMITTED"
- Response : "Experiment Submitted Sucessfully"
GET API :
URL : GET /experiment/{{expId}}
Input : ExperimentId
Output : Experiment Details for the respective experiment Id
Sample Response :
Code Block | ||||
---|---|---|---|---|
| ||||
{
"expId": "U1234",
"expName": "USER_ORG",
"expDescription": "Experiment to get users with orgname = sunbird",
"expData": {
"startDate": "2019-08-01",
"endDate": "2019-08-04",
"key": "/org/profile"
},
"createdBy": "User1",
"updatedBy": "ExperimentDataProduct",
"udpatedOn": "2019-08-02 19:00:00",
"createdOn": "2019-08-01 10:00:00",
"criteria": {
"type": "user",
"filter": {
"organisations.orgName": [
"sunbird"
]
}
},
"status": "active",
"status_msg": "Experiment is actively mapped",
"stats": {
"usersMatched": 234,
"devicesMatched": 0
}
} |
Experiment Definition Schema:
...