# Create an app object

Create an app object (for example a sheet, a story, ...) using the [CreateObject method](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/EngineJSONAPI/Content/service-doc-createobject.htm)

Information noteFor more information on a generic object, see [Generic objects](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/EngineAPI/Content/Sense_EngineAPI/GenericObject/overview-generic-object.htm).

## Examples

Example 1:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/CreateSheets/create-app-object.htm)

#### The goal is to create a sheet, SH01, in the app and add a child to that sheet. The handle of the app is 1.

1. Create the sheet SH01 (qId is SH01).

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "CreateObject",
  "handle": 1,
  "params": [
    {
      "title": "Sheet 1",
      "description": "Description of sheet 1",
      "qInfo": {
        "qId": "SH01",
        "qType": "sheet"
      },
      "qChildListDef": {
        "qData": {
          "title": "/title",
          "description": "/description",
          "meta": "/meta",
          "order": "/order",
          "type": "/qInfo/qType",
          "id": "/qInfo/qId",
          "lb": "/qListObjectDef",
          "hc": "/qHyperCubeDef"
        }
      }
    }
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "GenericObject",
      "qHandle": 2
    },
    "qInfo": {
      "qId": "SH01",
      "qType": "sheet"
    }
  },
  "change": [
    2
  ]
}
```

The sheet SH01 is created. Since the sheet definition contains qChildListDef, a GetLayout on the sheet will display the children of the sheet.

The handle of the sheet is 2.

2. Create a list object in the sheet. The request has 2 as a handle (qHandle) because the sheet has 2 as a handle.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "CreateChild",
  "handle": 2,
  "params": [
    {
      "qInfo": {
        "qId": "LB01",
        "qType": "ListObject"
      },
      "qListObjectDef": {
        "qStateName": "$",
        "qLibraryId": "",
        "qDef": {
          "qFieldDefs": [
            "Country"
          ],
          "qFieldLabels": [
            "Country Label"
          ],
          "qSortCriterias": [
            {
              "qSortByLoadOrder": 1
            }
          ]
        },
        "qInitialDataFetch": [
          {
            "qTop": 0,
            "qHeight": 1,
            "qLeft": 0,
            "qWidth": 1
          }
        ]
      },
      "title": "Title for ListObject01"
    }
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "qReturn": {
      "qType": "GenericObject",
      "qHandle": 3
    },
    "qInfo": {
      "qId": "LB01",
      "qType": "ListObject"
    }
  },
  "change": [
    3
  ]
}
```

The list object LB01 is created and its handle is 3.

3. Get the layout of the sheet (qhandle is 2).

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "GetLayout",
  "handle": 2,
  "params": []
}
```

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": { "qLayout": { "qInfo": { "qId": "SH01", "qType": "sheet" }, "qSelectionInfo": {}, "title": "Sheet 1", "description": "Description of sheet 1", "qChildList": { "qItems": [ { "qInfo": { "qId": "LB01", "qType": "ListObject" }, "qData": { "qListObject": { "qStateName": "$", "qSize": { "qcx": 1, "qcy": 22 }, "qDimensionInfo": { "qFallbackTitle": "Country Label", "qApprMaxGlyphCount": 14, "qCardinal": 22, "qSortIndicator": "A", "qGroupFallbackTitles": [ "Country Label" ], "qGroupPos": 0, "qStateCounts": { "qLocked": 0, "qSelected": 0, "qOption": 22, "qDeselected": 0, "qAlternative": 0, "qExcluded": 0, "qSelectedExcluded": 0, "qLockedExcluded": 0 }, "qTags": [ "$ascii", "$text" ], "qDimensionType": "D", "qGrouping": "N", "qNumFormat": { "qType": "R", "qnDec": 14, "qUseThou": 1, "qFmt": "##############", "qDec": ".", "qThou": "," }, "qIsAutoFormat": true, "qGroupFieldDefs": [ "Country" ] }, "qExpressions": [], "qDataPages": [ { "qMatrix": [ [ { "qText": "United States", "qNum": "NaN", "qElemNumber": 0, "qState": "O" } ] ], "qTails": [], "qArea": { "qLeft": 0, "qTop": 0, "qWidth": 1, "qHeight": 1 } } ] }, "title": "Title for ListObject01", "description": "", "meta": "", "order": "", "id": "", "type": "", "lb": { "qStateName": "$", "qDef": { "qGrouping": "N", "qFieldDefs": [ "Country" ], "qFieldLabels": [ "Country Label" ], "qSortCriterias": [ { "qSortByLoadOrder": 1, "qExpression": {} } ], "qNumberPresentations": [], "qActiveField": 0 }, "qFrequencyMode": "N", "qInitialDataFetch": [ { "qLeft": 0, "qTop": 0, "qWidth": 1, "qHeight": 1 } ], "qExpressions": [] }, "hc": "" } } ] } } } }

The list object is added to the list of children of the sheet (qChildList).

Example 2:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/CreateSheets/create-app-object.htm)

#### The goal of this example is to create a story and some slides inside the story and to get the layout of the story.

1. Create a story story01.

The client sends:

{ "jsonrpc": "2.0", "id": 1, "method": "CreateObject", "handle": 1, "params": [ { "title": "A Story", "description": "This is the story", "qInfo": { "qId": "story01", "qType": "story" }, "qChildListDef": { "qData": { "title": "/title", "description": "/description", "children": "/qChildListDef" } } } ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 2 }, "qInfo": { "qId": "story01", "qType": "story" } }, "change": [ 2 ] }

The story is created. The handle is 2. Since the story definition contains qChildListDef, a GetLayout on the story will display the children of the story.

2. Create a slide slide01 (qId is slide01).

The client sends:

{ "jsonrpc": "2.0", "id": 2, "method": "CreateChild", "handle": 2, "params": [ { "title": "Slide 01", "description": "This is the slide 01", "qInfo": { "qId": "slide01", "qType": "slide" }, "qChildListDef": { "qData": { "title": "/title" } } } ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 2, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 3 }, "qInfo": { "qId": "slide01", "qType": "slide" } }, "change": [ 3 ] }

The slide slide01 is created. Its handle is 3.

3. Create another slide slide02 (qId is slide02).

The client sends:

{ "jsonrpc": "2.0", "id": 3, "method": "CreateChild", "handle": 2, "params": [ { "title": "Slide 02", "description": "This is the slide 02", "qInfo": { "qId": "slide02", "qType": "slide" }, "qChildListDef": { "qData": { "title": "/title" } } } ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 4 }, "qInfo": { "qId": "slide02", "qType": "slide" } }, "change": [ 4 ] }

The slide slide02 is created. Its handle is 4.

4. Get the layout of the story. The handle of the request is 2 because the handle of the story is 2.

The client sends:

{ "jsonrpc": "2.0", "id": 4, "method": "GetLayout", "handle": 2, "params": [] }

The engine returns:

{ "jsonrpc": "2.0", "id": 4, "result": { "qLayout": { "qInfo": { "qId": "story01", "qType": "story" }, "qMeta": {}, "qSelectionInfo": {}, "title": "A Story", "description": "This is the story", "qChildList": { "qItems": [ { "qInfo": { "qId": "slide01", "qType": "slide" }, "qMeta": {}, "qData": { "title": "Slide 01", "description": "This is the slide 01", "children": { "qData": { "title": "/title" } } } }, { "qInfo": { "qId": "slide02", "qType": "slide" }, "qMeta": {}, "qData": { "title": "Slide 02", "description": "This is the slide 02", "children": { "qData": { "title": "/title" } } } } ] } } } }

The story contains two children: slide01 and slide02.

Example 3:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/CreateSheets/create-app-object.htm)

#### The goal of this example is to create a sheet SH01, then to create a sheet SH02 that is linked to the sheet SH01.

1. Create the sheet SH01 (qId is SH01).

The client sends:

{ "jsonrpc": "2.0", "id": 1, "method": "CreateObject", "handle": 1, "params": [ { "title": "Title for SH01", "description": "Description of sheet 1", "qInfo": { "qId": "SH01", "qType": "linked" }, "qChildListDef": { "qData": { "title": "/title", "description": "/description", "meta": "/meta", "order": "/order", "id": "/qInfo/qId", "type": "/qInfo/qType", "lb": "/qListObjectDef", "hc": "/qHyperCubeDef" } } } ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 2 }, "qInfo": { "qId": "SH01", "qType": "linked" } }, "change": [ 1, 2 ] }

The sheet SH01 is created and has 2 as a handle.

2. Create the sheet SH02 that is linked to the sheet SH01 (qExtendsId is SH01).

The client sends:

{ "jsonrpc": "2.0", "id": 2, "method": "CreateObject", "handle": 1, "params": [ { "qInfo": { "qId": "SH02", "qType": "sheet" }, "qExtendsId": "SH01" } ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 2, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 3 }, "qInfo": { "qId": "SH02", "qType": "sheet" } }, "change": [ 3 ] }

The sheet SH02 is created. This sheet is linked to the sheet SH01 and has 3 as a handle.

3. Get the layout of the sheet SH02 (qHandle is 3).

The client sends:

{ "jsonrpc": "2.0", "id": 3, "method": "GetLayout", "handle": 3, "params": [] }

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": { "qLayout": { "qInfo": { "qId": "SH02", "qType": "sheet" }, "qMeta": {}, "qExtendsId": "SH01", "qSelectionInfo": {}, "title": "Title for SH01", "description": "Description of sheet 1", "qChildList": { "qItems": [] } } } }

The sheet SH02 has the same properties as the sheet SH01.