Prerequisite:
1. Create a bookmark in the app.
The client sends:
{
"jsonrpc": "2.0",
"id": 7,
"method": "CreateBookmark",
"handle": 1,
"params": [
{
"qInfo": {
"qId": "Bookmark01",
"qType": "Bookmark"
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 7,
"result": {
"qReturn": {
"qType": "GenericBookmark",
"qHandle": 4
},
"qInfo": {
"qId": "Bookmark01",
"qType": "Bookmark"
}
},
"change": [
4
]
}
The bookmark is created and has 4 as a handle.
2. Publish the bookmark. The handle of the request is 4 because the handle of the bookmark is 4.
The client sends:
{
"jsonrpc": "2.0",
"id": 8,
"method": "Publish",
"handle": 4,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 8,
"result": {}
}
The bookmark is published.
3. Check that the bookmark is published.
The client sends:
{
"jsonrpc": "2.0",
"id": 13,
"method": "GetLayout",
"handle": 4,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 13,
"result": {
"qLayout": {
"qInfo": {
"qId": "Bookmark01",
"qType": "Bookmark"
},
"qMeta": {
"title": "",
"privileges": [
"create",
"read",
"update",
"delete",
"publish",
"changeowner"
],
"modifiedDate": "2014-07-31T10:52:08.63Z",
"published": true,
"publishTime": "2014-07-31T10:52:08.607Z",
"approved": false,
"owner": {
"userId": "platform_tester",
"userDirectory": "QT",
"name": "platform_tester",
"privileges": null,
"id": "c6f69127-55a0-4ddb-a92a-585874390da6"
},
"qSize": -1
},
"qBookmark": {
"qStateData": [
{
"qStateName": "$",
"qFieldItems": []
}
],
"qUtcModifyTime": 41851.536203703705
}
}
}
}
The bookmark is published. Result: result/qLayout/qMeta/published is set to true.