Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

GET API  :

URL :  GET  /experiment/{{expId}}Input :id

Request Params :  ExperimentId

Output Repsonse :  Experiment Details for the respective experiment Id

...

Code Block
themeRDark
titleSample Get API ReSposne
{
  "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
  }
}


GET LIST  API  :

URL :  GET  /experiment/list

Output :  List of all Experiments

Sample Response :

Code Block
themeRDark
titleSample Reponse Experiment List
{
  "experiments": [
    {
      "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
      }
    },
    {
      "expId": "D1234",
      "expName": "DEVICE_STATE_ANDHRAPRADESH",
      "expDescription": "Experiment to get deviceids with first_access Sep1st to Sep3rd",
      "expData": {
        "startDate": "2019-08-01",
        "endDate": "2019-08-04",
        "key": "/org/profile"
      },
      "createdBy": "User6",
      "updatedBy": "ExperimentDataProduct",
      "udpatedOn": "2019-08-02 19:00:00",
      "createdOn": "2019-07-04 10:00:00",
      "criteria": {
        "type": "device",
        "filter": {
          "name": "first_access",
          "operator": "RANGE",
          "value": {
            "start": "2019-02-10",
            "end": "2019-02-20"
          }
        }
      },
      "status": "FAILED",
      "status_msg": "Devices Not Found matching the Criteria",
      "stats": {
        "usersMatched": 0,
        "devicesMatched": 0
      }
    }
  ]
}


Experiment Definition Schema:

...

Purpose

  • To compute the user/device experiment mapping based on the experiment criteria and save it to elastic search

...