[comment]: # translation:outdated

[comment]: # ({c7f20528-f9e8f670})
# templategroup.get

[comment]: # ({/c7f20528-f9e8f670})

[comment]: # ({97635317-b5ff62ed})
### Beschrijving

`integer/array templategroup.get(object parameters)`

Deze methode maakt het mogelijk om sjabloongroepen op te halen aan de hand van de opgegeven parameters.

::: noteclassic
Deze methode is beschikbaar voor gebruikers van elk type. Toestemming
om de methode op te roepen kan worden ingetrokken in de instellingen van gebruikersrollen.
Zie [Gebruikersrollen](/handleiding/web_interface/frontend_sections/users/user_roles)
voor meer informatie.
:::

[comment]: # ({/97635317-b5ff62ed})

[comment]: # ({3ad25f56-6102edd8})
### Parameters

`(object)` Parameters that define the desired output.

The method supports the following parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|---------|---------------------------------------------------|-----------|
|graphids|string/array|Return only template groups that contain templates with the given graphs.|
|groupids|string/array|Return only template groups with the given template group IDs.|
|templateids|string/array|Return only template groups that contain the given templates.|
|triggerids|string/array|Return only template groups that contain templates with the given triggers.|
|with\_graphs|flag|Return only template groups that contain templates with graphs.|
|with\_graph\_prototypes|flag|Return only template groups that contain templates with graph prototypes.|
|with\_httptests|flag|Return only template groups that contain templates with web checks.|
|with\_items|flag|Return only template groups that contain templates with items.<br><br>Overrides the `with_simple_graph_items` parameters.|
|with\_item\_prototypes|flag|Return only template groups that contain templates with item prototypes.<br><br>Overrides the `with_simple_graph_item_prototypes` parameter.|
|with\_simple\_graph\_item\_prototypes|flag|Return only template groups that contain templates with item prototypes, which are enabled for creation and have numeric type of information.|
|with\_simple\_graph\_items|flag|Return only template groups that contain templates with numeric items.|
|with\_templates|flag|Return only template groups that contain templates.|
|with\_triggers|flag|Return only template groups that contain templates with triggers.|
|selectTemplates|query|Return a [templates](/manual/api/reference/template/object) property with the templates that belong to the template group.<br><br>Supports `count`.|
|limitSelects|integer|Limit the number of records returned by subselects.<br><br>Applies to the following subselects:<br>`selectTemplates` - results will be sorted by `template`.|
|sortfield|string/array|Sort the result by the given properties.<br><br>Possible values: `groupid`, `name`.|
|countOutput|boolean|These parameters are common for all `get` methods and are described in detail in the [reference commentary](/manual/api/reference_commentary#common_get_method_parameters) page.|
|editable|boolean|^|
|excludeSearch|boolean|^|
|filter|object|^|
|limit|integer|^|
|output|query|^|
|preservekeys|boolean|^|
|search|object|^|
|searchByAny|boolean|^|
|searchWildcardsEnabled|boolean|^|
|sortorder|string/array|^|
|startSearch|boolean|^|

[comment]: # ({/3ad25f56-6102edd8})

[comment]: # ({7223bab1-2bc18eb2})
### Retourwaarden

`(integer/array)` Geeft ofwel:

-   een reeks objecten;
-   het aantal opgehaalde objecten, als de parameter `countOutput` is
    gebruikt.

[comment]: # ({/7223bab1-2bc18eb2})

[comment]: # ({b41637d2-802b3dd1})
### Voorbeelden

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

[comment]: # ({3ca44c43-c32b9462})
#### Gegevens ophalen op basis van naam

Haal alle gegevens op over twee sjabloon groepen met de naam "Templates/Databases" en
"Templates/Modules".

[Aanvraag](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "templategroup.get",
    "params": {
        "output": "extend",
        "filter": {
            "name": [
                "Templates/Databases",
                "Templates/Modules"
            ]
        }
    },
    "id": 1
}
```

Reactie:

```json
{
    "jsonrpc": "2.0",
    "result": [
        {
            "groupid": "13",
            "name": "Templates/Databases",
            "uuid": "748ad4d098d447d492bb935c907f652f"
        },
        {
            "groupid": "8",
            "name": "Templates/Modules",
            "uuid": "57b7ae836ca64446ba2c296389c009b7"
        }
    ],
    "id": 1
}
```

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

[comment]: # ({f3cd9368-585b4960})
### Zie ook

-   [Sjabloon](/manual/api/reference/template/object#template)

[comment]: # ({/f3cd9368-585b4960})

[comment]: # ({9f94aa1e-31239fd5})
### Bron

CTemplateGroup::get() in *ui/include/classes/api/services/CTemplateGroup.php*.

[comment]: # ({/9f94aa1e-31239fd5})
