[comment]: # translation:outdated

[comment]: # ({3a1fae82-3a1fae82})
# screen.create

[comment]: # ({/3a1fae82-3a1fae82})

[comment]: # ({60023e33-60023e33})
### Description

`object screen.create(object/array screens)`

This method allows to create new screens.

[comment]: # ({/60023e33-60023e33})

[comment]: # ({afaa7c90-afaa7c90})
### Parameters

`(object/array)` Screens to create.

Additionally to the [standard screen properties](object#screen), the
method accepts the following parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|---------|---------------------------------------------------|-----------|
|screenitems|array|Screen [items](/manual/api/reference/screenitem/object#screen_item) to be created for the screen.|
|users|array|Screen [user](/manual/api/reference/screen/object#screen_user) shares to be created on the screen.|
|userGroups|array|Screen [user group](/manual/api/reference/screen/object#screen_user_group) shares to be created on the screen.|

[comment]: # ({/afaa7c90-afaa7c90})

[comment]: # ({e477435b-e477435b})
### Return values

`(object)` Returns an object containing the IDs of the created screens
under the `screenids` property. The order of the returned IDs matches
the order of the passed screens.

[comment]: # ({/e477435b-e477435b})

[comment]: # ({b41637d2-b41637d2})
### Examples

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({7c7479e9-7c7479e9})
#### Creating a screen

Create a screen named "Graphs" with 2 rows and 3 columns and add a graph
to the upper-left cell.

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "screen.create",
    "params": {
        "name": "Graphs",
        "hsize": 3,
        "vsize": 2,
        "screenitems": [
            {
                "resourcetype": 0,
                "resourceid": "612",
                "rowspan": 1,
                "colspan": 1,
                "x": 0,
                "y": 0
            }
        ]
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "screenids": [
            "26"
        ]
    },
    "id": 1
}
```

[comment]: # ({/7c7479e9-7c7479e9})

[comment]: # ({f2722f29-f2722f29})
#### Screen sharing

Create a screen with two types of sharing (user and user group).

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "screen.create",
    "params": {
        "name": "Screen sharing",
        "hsize": 3,
        "vsize": 2,
        "users": [
            {
                "userid": "4",
                "permission": "3"
            }
        ],
        "userGroups": [
            {
                "usrgrpid": "7",
                "permission": "2"
            }
        ]
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "screenids": [
            "83"
        ]
    },
    "id": 1
}
```

[comment]: # ({/f2722f29-f2722f29})

[comment]: # ({796d9b7a-796d9b7a})
### See also

-   [Screen item](/manual/api/reference/screenitem/object#screen_item)
-   [Screen user](object#screen_user)
-   [Screen user group](object#screen_user_group)

[comment]: # ({/796d9b7a-796d9b7a})

[comment]: # ({64dc8b7c-64dc8b7c})
### Source

CScreen::create() in *ui/include/classes/api/services/CScreen.php*.

[comment]: # ({/64dc8b7c-64dc8b7c})
