Prerequisite:
1. Create a measure in the app.
The client sends:
{
"jsonrpc": "2.0",
"id": 5,
"method": "CreateMeasure",
"handle": 1,
"params": [
{
"qInfo": {
"qId": "Measure01",
"qType": "Measure"
},
"qMeasure": {
"qLabel": "Count of Country",
"qDef": "=Count(Country)"
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"qReturn": {
"qType": "GenericMeasure",
"qHandle": 3
},
"qInfo": {
"qId": "Measure01",
"qType": "Measure"
}
},
"change": [
3
]
}
The measure is created and has 3 as a handle.
2. Publish the measure. The handle of the request is 3 because the handle of the measure is 3.
The client sends:
{
"jsonrpc": "2.0",
"id": 6,
"method": "Publish",
"handle": 3,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 6,
"result": {}
}
The measure is published.