Get the list of templates bizproc.workflow.template.list
Scope:
bizprocWho can execute the method: administrator
This method retrieves a list of business process templates.
Method Parameters
|
Name |
Description |
|
|
SELECT |
The array contains a list of fields to select. You can specify only the fields that are necessary. Default value — |
|
|
FILTER |
An object for filtering the list of business process templates in the format
You can specify the type of filtering before the name of the filtered field:
|
|
|
ORDER |
An object for sorting the list of launched business processes in the format
Sorting direction can take the values:
You can specify multiple fields for sorting, for example, Default value — |
|
|
start |
This parameter is used for managing pagination. The page size of results is always static — 50 records. To select the second page of results, you need to pass the value The formula for calculating the
|
Template Fields
|
Name |
Description |
|
ID |
Identifier of the business process template |
|
MODULE_ID |
Identifier of the module by document. Possible values:
|
|
ENTITY |
Identifier of the object by document. Possible values: CRM
Lists
Drive
|
|
DOCUMENT_TYPE |
Document type. Possible values:
lists:
drive:
|
|
AUTO_EXECUTE |
Auto-execute flag. Can take values:
|
|
NAME |
Template name |
|
TEMPLATE |
Array with the description of the template's action structure |
|
PARAMETERS |
Template parameters |
|
VARIABLES |
Template variables |
|
CONSTANTS |
Template constants |
|
MODIFIED |
Date of last modification |
|
IS_MODIFIED |
Whether the template has been modified. Possible values:
This option is needed for typical templates of business processes |
|
USER_ID |
Identifier of the user who created or modified the template |
|
SYSTEM_CODE |
System code of the template. Needed for identifying typical business process templates or templates created by the application |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"select":["ID","NAME","USER_ID","SYSTEM_CODE"],"filter":{"MODULE_ID":"lists","AUTO_EXECUTE":0},"order":{"ID":"DESC"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/bizproc.workflow.template.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"select":["ID","NAME","USER_ID","SYSTEM_CODE"],"filter":{"MODULE_ID":"lists","AUTO_EXECUTE":0},"order":{"ID":"DESC"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/bizproc.workflow.template.list
// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory usage.
const parameters = {
select: [
'ID',
'NAME',
'USER_ID',
'SYSTEM_CODE'
],
filter: {
MODULE_ID: 'lists',
AUTO_EXECUTE: 0
},
order: {
ID: 'DESC'
}
};
try {
const response = await $b24.callListMethod('bizproc.workflow.template.list', parameters);
const items = response.getData() || [];
for (const entity of items) { console.log('Entity:', entity); }
} catch (error) {
console.error('Request failed', error);
}
// fetchListMethod: Retrieves data in parts using an iterator. Use it for large data volumes to optimize memory usage.
try {
const generator = $b24.fetchListMethod('bizproc.workflow.template.list', parameters, 'ID');
for await (const page of generator) {
for (const entity of page) { console.log('Entity:', entity); }
}
} catch (error) {
console.error('Request failed', error);
}
// callMethod: Manually controls pagination through the start parameter. Use it for precise control of request batches. For large datasets, it is less efficient than fetchListMethod.
try {
const response = await $b24.callMethod('bizproc.workflow.template.list', parameters, 0);
const result = response.getData().result || [];
for (const entity of result) { console.log('Entity:', entity); }
} catch (error) {
console.error('Request failed', error);
}
try {
$result = $serviceBuilder
->getBizProcScope()
->template()
->list(
['ID', 'MODULE_ID', 'ENTITY', 'DOCUMENT_TYPE', 'AUTO_EXECUTE', 'NAME', 'TEMPLATE', 'PARAMETERS', 'VARIABLES', 'CONSTANTS', 'MODIFIED', 'IS_MODIFIED', 'USER_ID', 'SYSTEM_CODE'],
[]
);
foreach ($result->getTemplates() as $template) {
print("ID: " . $template->ID . "\n");
print("MODULE_ID: " . $template->MODULE_ID . "\n");
print("ENTITY: " . $template->ENTITY . "\n");
print("DOCUMENT_TYPE: " . json_encode($template->DOCUMENT_TYPE) . "\n");
print("AUTO_EXECUTE: " . ($template->AUTO_EXECUTE ? $template->AUTO_EXECUTE->value : 'null') . "\n");
print("NAME: " . $template->NAME . "\n");
print("TEMPLATE: " . json_encode($template->TEMPLATE) . "\n");
print("PARAMETERS: " . json_encode($template->PARAMETERS) . "\n");
print("VARIABLES: " . json_encode($template->VARIABLES) . "\n");
print("CONSTANTS: " . json_encode($template->CONSTANTS) . "\n");
print("MODIFIED: " . ($template->MODIFIED ? $template->MODIFIED->format(DATE_ATOM) : 'null') . "\n");
print("IS_MODIFIED: " . ($template->IS_MODIFIED ? 'true' : 'false') . "\n");
print("USER_ID: " . $template->USER_ID . "\n");
print("SYSTEM_CODE: " . $template->SYSTEM_CODE . "\n");
print("\n");
}
} catch (Throwable $e) {
print("Error: " . $e->getMessage() . "\n");
}
BX24.callMethod(
'bizproc.workflow.template.list',
{
select: [
'ID',
'NAME',
'USER_ID',
'SYSTEM_CODE'
],
filter: {
MODULE_ID: 'lists',
AUTO_EXECUTE: 0
},
order: {
ID: 'DESC'
}
},
function(result)
{
if(result.error())
alert("Error: " + result.error());
else
console.log(result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'bizproc.workflow.template.list',
[
'select' => [
'ID',
'NAME',
'USER_ID',
'SYSTEM_CODE'
],
'filter' => [
'MODULE_ID' => 'lists',
'AUTO_EXECUTE' => 0
],
'order' => [
'ID' => 'DESC'
]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP status: 200
{
"result": [
{
"ID": "525",
"NAME": "Display Time",
"USER_ID": "503",
"SYSTEM_CODE": "rest_app_5"
},
{
"ID": "379",
...
}
...
],
"total": 34,
"time": {
"start": 1737535822.539526,
"finish": 1737535822.564579,
"duration": 0.025053024291992188,
"processing": 0.0019738674163818359,
"date_start": "2025-01-22T11:50:22+02:00",
"date_finish": "2025-01-22T11:50:22+02:00",
"operating_reset_at": 1737536422,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
The root element of the response. Contains an array of objects with information about business process templates. Each object contains fields of the template specified in the |
|
total |
Total number of records found |
|
time |
Information about the execution time of the request |
Error Handling
HTTP status: 400
{
"error": "ACCESS_DENIED",
"error_description": "Access denied!",
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Error Codes
|
Code |
Error Message |
Description |
|
|
Access denied! |
The method was not executed by an administrator |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not allowed to be called using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The methods must be called using the HTTPS protocol |
|
|
|
The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support |
|
|
|
The REST API is available only on commercial plans |
|
|
|
The user whose access token or webhook was used to call the method lacks permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Business Process Templates: Overview of Methods
- Add Business Process Template bizproc.workflow.template.add
- Update Business Process Template bizproc.workflow.template.update
- Delete Business Process Template bizproc.workflow.template.delete