---
keyword: [Extend, PMD Scripting, Scripts, Graph API]
nav: wcp_docs
parent_url: /wcp_docs/
title: createIds(ids)
layout: subsection
---

## <a id="section_1"></a>Description

Returns a list of instance ID objects for Graph API mutations. Converts each non-null `id` in the specified list of IDs into one instance ID object. Each object has a default type of `WID`.

Returns null if the `ids` list is null.

Returns an empty list if the `ids` list is empty.

## <a id="section_2"></a>Return Type

List of maps

## <a id="section_3"></a>Namespace Function Syntax

```
graph:createIds(ids)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>ids</td><td>List of strings. A list of IDs.</td></tr></tbody></table><br/>

<b>Examples</b>

`graph:createIds(['ID1', 'ID2'])`

Returns

```
[
    {
        "id": {
            "id": "ID1",
            "type": "WID"
        }
    },
    {
        "id": {
            "id": "ID2",
            "type": "WID"
        }
    }
]

 
```

`graph:createIds(null)`

Returns `null`.

`graph:createIds([])`

Returns `[]`.

