1. Add the first alternate state AlternateState1.The handle of the request is 1 because the handle of the app is 1.
The client sends:
{
"jsonrpc": "2.0",
"id": 1,
"method": "AddAlternateState",
"handle": 1,
"params": [
"AlternateState1"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
The alternate state AlternateState1 is added.
2. Add the second alternate state AlternateState2.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "AddAlternateState",
"handle": 1,
"params": [
"AlternateState2"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {}
}
The alternate state AlternateState2 is added.
3. Get the app layout. The handle of the request is 1 because the app uses 1 for its handle.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "GetAppLayout",
"handle": 1,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qLayout": {
"qTitle": "Golf Quest",
"qFileName": "C:\\Users\\smu\\Documents\\Qlik\\Sense\\Apps\\Golf Quest.qvf",
"qLastReloadTime": "2013-10-09T14:11:34Z",
"qModified": true,
"qHasScript": true,
"qStateNames": [
"AlternateState1",
"AlternateState2"
],
"qMeta": {},
"qHasData": true,
"description": ""
}
}
}
The app contains two alternate states: AlternateState1 and AlternateState2.