Publish a dimension
Publish a dimension that belongs to a published app, by using the Publish method.
The target of the request is the handle of the dimension.
Example
Prerequisite:
- The app is published.
1. Create a dimension in the app.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "CreateDimension",
"handle": 1,
"params": [
{
"qInfo": {
"qId": "Dimension01",
"qType": "Dimension"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Country library label"
]
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"qReturn": {
"qType": "GenericDimension",
"qHandle": 2
},
"qInfo": {
"qId": "Dimension01",
"qType": "Dimension"
}
},
"change": [
2
]
}
The dimension is created and has 2 as a handle.
2. Publish the dimension. The handle of the request is 2 because the handle of the dimension is 2.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "Publish",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {}
}
The dimension is published.
3. Check that the dimension is published.
The client sends:
{
"jsonrpc": "2.0",
"id": 6,
"method": "GetLayout",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"qLayout": {
"qInfo": {
"qId": "Dimension01",
"qType": "Dimension"
},
"qMeta": {
"title": "",
"privileges": [
"create",
"read",
"update",
"delete",
"publish",
"changeowner"
],
"modifiedDate": "2014-07-31T09:15:05.532Z",
"published": true,
"publishTime": "2014-07-31T09:15:05.507Z",
"approved": false,
"owner": {
"userId": "platform_tester",
"userDirectory": "QT",
"name": "platform_tester",
"privileges": null,
"id": "c6f69127-55a0-4ddb-a92a-585874390da6"
},
"qSize": -1
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Country library label"
]
},
"qDimInfos": [
{
"qApprMaxGlyphCount": 7,
"qCardinal": 1,
"qTags": [
"$ascii",
"$text"
]
}
]
}
}
}
The dimension is published. Result: result/qLayout/qMeta/published is set to true.