Documentation

documentgenerator.template.list

documentgenerator.template.list(select = ['*'], filter = [], order = [], start = 0)

The method returns list of templates by the filter.

Parameters

Parameter Description
selectarray of field for display. Displays all template fields by default, except users and providers. They must be added additionally. For example, ['*', 'providers', 'users'].
orderarray to specify order for displaying {"id": "desc"}.
filterarray for filtration.
startoffset for pagewise navigation.

Filter examples

filter: {
  "numeratorId": "20",
  "region": "en",
  "active": "Y"
}

Default filter has the following values:

filter: {
  "moduleId": "rest", // cannot be modified, the method always returns template only for REST
  "isDeleted": "N" // "@isDeleted": ["Y", "N"] must be passed if the list of template is required without isDeleted, 
}

The method returns list of templates with their fields.

Example

templates: {
   202: {
        "id": "202",
        "active": "Y",
        "name": "Rest Template",
        "code": "",
        "region": "en",
        "sort": "100",
        "createTime": "2018-06-05T13:07:12+02:00",
        "updateTime": "2018-09-06T14:26:24+02:00",
        "moduleId": "rest",
        "numeratorId": "20",
        "withStamps": "N",
        "isDeleted": "N",
        "download": "",
        "downloadMachine": "",
        "providers": [
            "bitrix\documentgenerator\dataprovider\rest": "bitrix\documentgenerator\dataprovider\rest"
        ],
        "users" [
          "0": "UA"
        ]
    }
}



© «Bitrix24», 2001-2024