# Clone a visualization

## Overview

Clone a sheet, a story or a visualization by using the [CloneObject method](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/EngineJSONAPI/Content/service-doc-cloneobject.htm).

Information noteIf you clone an object that contains some children, both the object and the children are cloned. The clone object contains the cloned children.

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/CreateVisualizations/clone-visualization.htm)

#### The goal is to clone a sheet.

The handle of the app is 1.

1. Create a sheet list (qAppObjectListDef is set in the definition of the object).

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "CreateObject",
  "handle": 1,
  "params": [
    {
      "qInfo": {
        "qId": "SL01",
        "qType": "SheetList"
      },
      "qAppObjectListDef": {
        "qType": "sheet",
        "qData": {
          "title": "/title",
          "id": "/qInfo/qId"
        }
      }
    }
  ]
}
```

The engine returns:

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

The sheet list SL01 is created.

2. Create a sheet, with identifier Sheet01.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "CreateObject",
  "handle": 1,
  "params": [
    {
      "title": "Original",
      "description": "Description of sheet 1",
      "qInfo": {
        "qId": "Sheet01",
        "qType": "sheet"
      },
      "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": 2,
  "result": {
    "qReturn": {
      "qType": "GenericObject",
      "qHandle": 3
    },
    "qInfo": {
      "qId": "Sheet01",
      "qType": "sheet"
    }
  },
  "change": [
    3
  ]
}
```

The sheet is created and has 3 as a handle.

3. Clone the sheet. The handle of the request is 1 because the [CloneObject method](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/EngineJSONAPI/Content/service-doc-cloneobject.htm) applies at app level.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "CloneObject",
  "handle": 1,
  "params": [
    "Sheet01"
  ]
}
```

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": { "qCloneId": "5d2884f5-cf31-4b80-86c6-35f329711255" } }

The clone is created. The identifier of the clone (which is set by the Qlik associative engine) is 5d2884f5-cf31-4b80-86c6-35f329711255.

4. Get the handle of the clone Sh01.

The client sends:

{ "jsonrpc": "2.0", "id": 4, "method": "GetObject", "handle": 1, "params": [ "5d2884f5-cf31-4b80-86c6-35f329711255" ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 4, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 4 } } }

The handle of the clone is 4.

5. Get the layout of the clone.

The client sends:

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

The engine returns:

{ "jsonrpc": "2.0", "id": 5, "result": { "qLayout": { "qInfo": { "qId": "5d2884f5-cf31-4b80-86c6-35f329711255", "qType": "sheet" }, "qMeta": {}, "qSelectionInfo": {}, "title": "Original", "description": "Description of sheet 1", "qChildList": { "qItems": [] } } } }

The clone is identical to the original sheet.

6. Check that the clone is added to the list of sheets. The handle of the list of sheets is 2.

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": "SL01", "qType": "SheetList" }, "qMeta": {}, "qSelectionInfo": {}, "qAppObjectList": { "qItems": [ { "qInfo": { "qId": "Sheet01", "qType": "sheet" }, "qMeta": {}, "qData": { "title": "Original", "id": "" } }, { "qInfo": { "qId": "5d2884f5-cf31-4b80-86c6-35f329711255", "qType": "sheet" }, "qMeta": {}, "qData": { "title": "Original", "id": "" } } ] } } } }

The sheet list contains the sheet Sheet01 and the clone 5d2884f5-cf31-4b80-86c6-35f329711255.