This commit is contained in:
@ -1,19 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
<title>API methods in modules</title>
|
||||
<title>Методы API в модулях</title>
|
||||
<meta name="generator" content="Help+Manual" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="In BRIX, you can create your own custom methods in modules and use them in the Web API, widgets, pages, and process scripts, or when configuring document templates. For..." />
|
||||
<meta name="description" content="В ELMA365 авторы модулей могут создавать свои собственные методы и использовать их в web API, в скриптах виджетов, страниц и процессов или при настройке шаблона документа...." />
|
||||
<meta name="picture" content="" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="Full documentation for BRIX365 platform. Low-code developer guide. User guide. Admin guide. Developer guide." />
|
||||
<meta property="og:url" content="https://brix365.com/en/help" />
|
||||
<meta property="og:image" content="" />
|
||||
<meta property="og:title" content="Cправка по Low-code платформе ELMA365" />
|
||||
<meta property="og:url" content="https://elma365.com/ru/help" />
|
||||
<meta property="og:image" content="" />
|
||||
<meta property="og:site_name" content="ELMA365" />
|
||||
<link rel="icon" href="favicon.png" type="image/png" />
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
@ -23,6 +24,7 @@
|
||||
<link rel="stylesheet" href="./article.css" />
|
||||
<link rel="stylesheet" href="./glossary.css" />
|
||||
<link rel="stylesheet" href="./theme.css" />
|
||||
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="helpman_settings.js"></script>
|
||||
<script type="text/javascript" src="helpman_topicinit.js"></script>
|
||||
@ -34,16 +36,16 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M6ETBEC1R9"></script><script>window.dataLayer=window.dataLayer || []; function gtag(){dataLayer.push(arguments);}gtag('js', new Date()); gtag('config', 'G-M6ETBEC1R9');</script>
|
||||
<script>!function(e,t,c,n,r,a,m){e.ym=e.ym||function(){(e.ym.a=e.ym.a||[]).push(arguments)},e.ym.l=1*new Date;for(var s=0;s<document.scripts.length;s++)if(document.scripts[s].src===n)return;a=t.createElement(c),m=t.getElementsByTagName(c)[0],a.async=1,a.src=n,m.parentNode.insertBefore(a,m)}(window,document,"script","https://mc.yandex.ru/metrika/tag.js"),ym(83179930,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0,webvisor:!0})</script><noscript><div><img alt=""src=https://mc.yandex.ru/watch/83179930 style=position:absolute;left:-9999px></div></noscript>
|
||||
|
||||
<header class="header elma-365">
|
||||
<div class="container">
|
||||
<a class="header__logo" href="https://brix365.com/en/help">
|
||||
<img src="./logo-en.svg" alt="header logo">
|
||||
<a class="header__logo" href="https://elma365.com/ru/help">
|
||||
<img src="./logo.svg" alt="header logo">
|
||||
</a>
|
||||
<!-- <div class="hero__search-form" id="search-panel">
|
||||
<form class="search-form" onsubmit="ym(83180416,'reachGoal','poisk')">
|
||||
<form class="search-form" onsubmit="ym(83179930,'reachGoal','poisk')">
|
||||
<label class="search-form__label">
|
||||
<span id="reset-search" class="search__icon"></span>
|
||||
<input class="search-form__input" type="text">
|
||||
@ -63,7 +65,7 @@
|
||||
</div>
|
||||
<div class="header__navi">
|
||||
|
||||
<ul class="header__list"><li><span class="solution-select"><span class="solution-select__selected"></span><svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L3.5 3.5L6 1" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg><ul class="solution-select__list"><li><a class="project-link" href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a class="project-link" href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a class="project-link" href="https://brix365.com/en/help/crm/crm_overview.html">CRM</a></li><li><a class="project-link" href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a class="project-link" href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li><li><a class="project-link" href="https://brix365.com/en/help/business_solutions/-elma365-store.html">Business Solutions</a></li></ul></span></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li><li><a href="https://tssdk.brix365.com/" target="_blank">SDK</a></li></ul>
|
||||
<ul class="header__list"><li><span class="solution-select"><span class="solution-select__selected"></span><svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L3.5 3.5L6 1" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg><ul class="solution-select__list"><li><a class="project-link" href="https://elma365.com/ru/help/platform/get-trial.html">Платформа</a></li><li><a class="project-link" href="https://elma365.com/ru/help/ecm/ecm-functions.html">ECM</a></li><li><a class="project-link" href="https://elma365.com/ru/help/crm/crm_overview.html">CRM</a></li><li><a class="project-link" href="https://elma365.com/ru/help/service/service-functions.html">Service</a></li><li><a class="project-link" href="https://elma365.com/ru/help/projects/projects-functions.html">Проекты</a></li><li><a class="project-link" href="https://elma365.com/ru/help/business_solutions/-elma365-store.html">Бизнес-решения</a></li></ul></span></li><li><a href="https://api.elma365.com/ru/"target="_blank">API</a></li><li><a href="https://tssdk.elma365.com/"target="_blank">SDK</a></li><li><a href="https://community.elma365.com/" target="_blank">Community</a></li><li><a href="https://elma-academy.com/ru/" target="_blank">Академия</a></li><li><a href="https://elma365.com/ru/" target="_blank">Сайт ELMA365</a></li></ul>
|
||||
|
||||
|
||||
</div>
|
||||
@ -78,8 +80,8 @@
|
||||
|
||||
<aside class="sidebar" id="sidebar">
|
||||
<div class="sidebar__header">
|
||||
<a class="header__logo" href="https://brix365.com/en/help">
|
||||
<img src="./logo-light-en.svg">
|
||||
<a class="header__logo" href="https://elma365.com/ru/help">
|
||||
<img src="./logo-light.svg">
|
||||
</a>
|
||||
<span class="sidebar__close elma-365-close" id="close"></span>
|
||||
</div>
|
||||
@ -92,15 +94,15 @@
|
||||
<div class="article-inner">
|
||||
<div class="content">
|
||||
<header class="article__header">
|
||||
<div class="article__bread" style="display:flex; gap:10px;">
|
||||
<div class="article__bread" style="display:flex; gap:10px;">
|
||||
<span id="subcategory" class="search-res__item-category search-res__item-category_subcategory subcategory article__badge"></span>
|
||||
|
||||
<div class="topic__breadcrumbs">
|
||||
<p><a href="360024498352.html">Modules</a> > <a href="extentions.html">Custom modules</a> / API methods in modules</p>
|
||||
<p><a href="360024498352.html">Модули расширения системы</a> > <a href="extentions.html">Пользовательские модули</a> / Методы API в модулях</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="topic__title"><h1 class="p_Heading1"><span class="f_Heading1">API methods in modules</span></h1>
|
||||
<div class="topic__title"><h1 class="p_Heading1"><span class="f_Heading1">Методы API в модулях</span></h1>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
@ -109,86 +111,90 @@
|
||||
<a href="#h1-article" class="scroll-top"></a>
|
||||
</div>
|
||||
<!-- Placeholder for topic body. -->
|
||||
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><span style="font-family: Inter;">In BRIX, you can create your own custom methods in modules and use them in the Web API, widgets, pages, and process scripts, or when <a href="another-template-syntax-functions.html#exttext" class="topiclink">configuring document templates</a>. For instance, you can design methods to initiate a business process, conduct complex data retrieval, or establish intermediate communication with an internal or external system.</span></p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-family: Inter;">You can also devise general-purpose functions and reuse them in different places.</span></p>
|
||||
<h2 class="p_Heading2"><span class="f_Heading2">Create a method</span></h2>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-family: Inter;">To create a method, do the following:</span></p>
|
||||
<p class="p_Normal">В ELMA365 авторы модулей могут создавать свои собственные методы и использовать их в web API, в скриптах виджетов, страниц и процессов или при <a href="360027003711.html" class="topiclink">настройке шаблона документа</a>. Например, можно создать методы для запуска бизнес‑процесса, сложной выборки данных или организовать методы для промежуточного взаимодействия с внутренней или внешней системой. </p>
|
||||
<p class="p_Normal">Можно создавать функции общего назначения и использовать их повторно в разных местах. </p>
|
||||
<h2 class="p_Heading2"><span class="f_Heading2">Создание метода </span></h2>
|
||||
<p class="p_Normal">Чтобы создать метод, выполните следующие действия:</p>
|
||||
<ol style="list-style-type:upper-roman">
|
||||
<li value="1" class="p_Normal">Go to <span style="font-weight: bold;">Administration > Modules</span>.</li><li value="2" class="p_Normal">Hover the mouse over the module and click the gear icon.</li></ol>
|
||||
<p class="p_Normal" style="margin: 0 0 0 34px;"><img alt="api_modules_01" width="470" height="168" style="margin:0;width:470px;height:168px;border:none" src="api_modules_01.png"/></p>
|
||||
<ol style="list-style-type:upper-roman" start="3">
|
||||
<li value="3" class="p_Normal">Go to the <span style="font-weight: bold;">API Methods</span> tab.</li><li value="4" class="p_Normal">Click <span style="font-weight: bold;">Edit</span>. The method editor will open.</li><li value="5" class="p_Normal">Click the<span style="font-weight: bold;"> +Add </span>button. In the window that opens, enter the required information.</li></ol>
|
||||
<p class="p_Normal" style="margin: 0 0 0 34px;"><img alt="extention-API-1" width="770" height="370" style="margin:0;width:770px;height:370px;border:none" src="extention-api-1.png"/></p>
|
||||
<p class="p_Normal"> </p>
|
||||
<li value="1" style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">Перейдите в </span><span style="font-weight: bold; color: #394149;">Администрирование</span><span style="color: #394149;"> </span><span style="font-weight: bold; color: #394149;">></span><span style="color: #394149;"> </span><span style="font-weight: bold; color: #394149;">Модули</span><span style="color: #394149;">.</span></li><li value="2" style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">Наведите курсор на модуль и нажмите на появившийся значок шестерёнки.</span></li></ol>
|
||||
<p style="background: #ffffff; margin: 14px 0 0 36px;"><img alt="extention-settings1" width="274" height="130" style="margin:0;width:274px;height:130px;border:none" src="extention-settings1.png"/></p>
|
||||
<ol style="list-style-type:upper-roman">
|
||||
<li value="3" style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">Перейдите на вкладку </span><span style="font-weight: bold; color: #394149;">Методы API</span><span style="color: #394149;">.</span></li><li value="4" style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">Нажмите </span><span style="font-weight: bold; color: #394149;">Редактировать</span><span style="color: #394149;">. Откроется редактор методов.</span></li><li value="5" style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">Нажмите кнопку</span><span style="font-weight: bold; color: #394149;"> + Добавить</span><span style="color: #394149;">. В открывшемся окне внесите нужную информацию.</span></li></ol>
|
||||
<p style="background: #ffffff; margin: 14px 0 0 36px;"><img alt="exten_16" width="803" height="432" style="margin:0;width:803px;height:432px;border:none" src="exten_16.png"/></p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li class="p_Normal"><span style="font-weight: bold;">Name</span><span style="font-weight: bold; color: #ff0000;">*</span>. Enter the method name.</li><li class="p_Normal"><span style="font-weight: bold;">Address</span><span style="font-weight: bold; color: #ff0000;">*</span>. Select one or more HTTP request methods from the list. The following methods are available: <code><b>GET</b></code>, <code><b>POST</b></code>, <code><b>PUT</b></code>, <code><b>PATCH</b></code>, and <code><b>DELETE</b></code>. Specify at what address the method will be available at. In doing so, you can:<ul style="list-style-type:circle">
|
||||
<li class="p_Normal">Specify the path to nested methods. Use a forward slash <code><b>/</b></code> to specify a child method, e.g. <code><b>main/email_dispatch or call_events/route/</b></code><span style="font-size: 15px; font-family: Inter; color: #394149;">. The number of nesting levels is unlimited.</span></li><li class="p_Normal">Specify a wildcard for passing variable values to the method URL. Add a combination of <code><b>/*</b></code> characters at the end of the method address, e.g. <code><b>orders/*</b></code> or <code><b>orders/process/*</b></code>. In the method script you will be able to customize the processing of variable values that are passed when the method is called. For example, you can pass the user ID to get the user's name and e-mail as a result of the request. Read more about scripting such methods and calling them in the <a href="api-method-with-wildcard.html" class="topiclink">Use API methods with wildcards in modules</a> article.<br />
|
||||
<br />
|
||||
Note, the <code><b>/</b></code> and <code><b>*</b></code> characters at the end of the address do not ensure the uniqueness of the method, so the addresses of two methods cannot differ only by them. For example, if you have already added a <code><b>files/</b></code> method, an error will occur when you try to create a <code><b>files/*</b></code> method<span style="font-size: 15px; font-family: Inter; color: #394149;">.</span></li></ul>
|
||||
<li class="p_Normal"><span style="font-weight: bold;">Function</span><span style="font-weight: bold; color: #ff0000;">*</span>. Create a function that will be executed when a request is received.</li><li class="p_Normal"><span style="font-weight: bold;">Authorization</span>. Select an authorization type to use when a request is received.<ul style="list-style-type:circle">
|
||||
<li class="p_Normal"><span style="font-weight: bold;">Internal</span>. When this option is selected, the method can only be called within the module, for instance, in other methods, widgets, business processes activities, and event handlers. To call it, you need to use the <code><b>Namespace.api.method_name</b></code> command. Read more <a href="extention-api.html#call-method" class="topiclink">below</a>. The user under whose name the script runs must be logged in to BRIX.</li><li class="p_Normal"><span style="font-weight: bold;">External</span>. When this option is selected, the method will be available from the external system via a <a href="360016488452.html" class="topiclink">token</a>.</li></ul>
|
||||
<li class="p_Normal"><span style="font-weight: bold;">Asynchronous start</span>. This option allows you to continue your work without waiting for method execution to finish.</li><li class="p_Normal"><span style="font-weight: bold;">Description</span>. Write a detailed description of the method.</li></ul>
|
||||
<ol style="list-style-type:upper-roman" start="6">
|
||||
<li value="6" class="p_Normal">Go to the <span style="font-weight: bold;">Scripts</span> tab and write the code. Use the <a href="https://www.typescriptlang.org/" target="_blank" class="weblink">TypeScript</a> programming language. To learn more about the basic principles of script writing in <span style="background-color: #ffffff;">BRIX</span>, please visit <a href="https://tssdk.brix365.com/" target="_blank" class="weblink">BRIX TS SDK</a>.</li><li value="7" class="p_Normal">Save and publish the method.</li></ol>
|
||||
<h2 class="p_Heading2"><a id="access-to-global-constants" class="hmanchor"></a><span class="f_Heading2">Access to global constants</span></h2>
|
||||
<p class="p_Normal">By default, API methods can only access workspace components at the level of which they are configured. You can additionally access other system objects via a <a href="global-constants.html" class="topiclink">global constant</a>. To do this, in the method editor go to the <span style="font-weight: bold;">Scripts</span> tab and click <span style="font-weight: bold;">Settings</span> in the top panel.</p>
|
||||
<p class="p_Normal"><img alt="extention-API-2" width="870" height="336" style="margin:0;width:870px;height:336px;border:none" src="extention-api-2.png"/></p>
|
||||
<p class="p_Normal">You can use the following options:</p>
|
||||
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Название</span><span style="font-size: 15px; font-weight: bold; color: #ff0000;">*</span><span style="color: #394149;"> — укажите название метода;</span></li><li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Адрес</span><span style="font-size: 15px; font-weight: bold; color: #ff0000;">*</span><span style="color: #394149;"> — в выпадающем списке выберите один или несколько методов HTTP‑запроса. Доступны следующие методы: </span><code><b>GET</b></code><span style="color: #394149;">, </span><code><b>POST</b></code><span style="color: #394149;">, </span><code><b>PUT</b></code><span style="color: #394149;">, </span><code><b>PATCH</b></code><span style="color: #394149;">, </span><code><b>DELETE</b></code><span style="color: #394149;">. Затем укажите адрес, по которому будет доступен метод API. При этом вы можете:</span><ul style="list-style-type:circle">
|
||||
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">обозначить путь к вложенным методам — с помощью знака </span><span style="font-weight: bold; color: #394149;">/</span><span style="color: #394149;"> задайте дочерний метод, например </span><code><b>main/email_dispatch</b></code><span style="color: #394149;"> или </span><code><b>call_events/route/</b></code><span style="color: #394149;">. Количество уровней вложенности неограниченно;</span></li><li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">задать гибкий адрес для передачи значений переменных в URL метода — добавьте в конце адреса метода сочетание символов </span><span style="font-weight: bold; color: #394149;">/*</span><span style="color: #394149;">, например </span><code><b>orders/*</b></code><span style="color: #394149;"> или </span><code><b>orders/process/*</b></code><span style="color: #394149;">. В скрипте метода вы сможете настроить обработку значений переменных, которые передаются при его вызове. Например, можно передавать ID пользователя, чтобы получить в результате запроса его имя и электронную почту. Подробнее о написании скрипта таких методов и их вызове читайте в статье <a href="api-method-with-wildcard.html" class="topiclink">«Настройка метода API с гибким адресом в модуле»</a>.</span></li></ul></li></ul>
|
||||
<p style="background: #ffffff; margin: 14px 0 0 58px;"><span style="color: #394149;">Обратите внимание, символы </span><span style="font-weight: bold; color: #394149;">/</span><span style="color: #394149;"> и </span><span style="font-weight: bold; color: #394149;">*</span><span style="color: #394149;"> в конце адреса не обеспечивают уникальность метода, поэтому адреса двух методов не могут отличаться только ими. Например, если вы уже добавили метод </span><code><b>files/</b></code><span style="color: #394149;">, при попытке создать метод </span><code><b>files/*</b></code><span style="color: #394149;"> возникнет ошибка.</span></p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li class="p_Normal"><span style="font-weight: bold;">Global constants</span>. Check the <span style="font-weight: bold;">Global</span> option to be able to refer to objects from all workspaces in the system and to global parameters. The <a href="https://tssdk.brix365.com/en/latest/pages/quick-start/intro_globals.html#global" target="_blank" class="weblink">Global</a> constant is used for this purpose.</li></ul>
|
||||
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Функция</span><span style="font-size: 15px; font-weight: bold; color: #ff0000;">*</span><span style="color: #394149;"> — создайте функцию, которая будет выполняться при получении запроса;</span></li><li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Авторизация</span><span style="color: #394149;"> — выберите тип авторизации, который будет применяться при получении запроса: </span><ul style="list-style-type:circle">
|
||||
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Внутренняя авторизация</span><span style="color: #394149;"> — </span>метод можно вызывать только внутри модуля, например, в других методах, виджетах, действиях в бизнес-процессах, обработчиках событий с помощью команды <code><b>Namespace.api.название_метода</b></code>.<span style="color: #394149;"> </span>Подробнее об этом мы написали <a href="extention-api.html#api_call" class="topiclink">ниже</a>. <span style="color: #394149;">Пользователь, от имени которого исполняется скрипт, должен быть авторизован в ELMA365; </span></li><li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Внешняя авторизация</span><span style="color: #394149;"> — при выборе этой опции метод будет доступен из внешней системы по <a href="360016488452.html" class="topiclink">токену</a>; </span></li></ul>
|
||||
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Асинхронный запуск</span><span style="color: #394149;"> — опция позволяет не ожидать выполнение скрипта метода перед тем, как начать обработку других вызовов в модуле. В этом случае ответ на запрос приходит сразу и не содержит результатов работы метода; </span></li><li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold; color: #394149;">Описание</span><span style="color: #394149;"> — укажите подробное описание метода.</span></li></ul>
|
||||
<ol style="list-style-type:upper-roman">
|
||||
<li value="6" style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;">Перейдите на вкладку </span><span style="font-weight: bold; color: #394149;">Скрипты </span><span style="color: #394149;">и напишите метод. </span><span style="font-size: 13px; color: #394149; background-color: #ffffff;">Для этого используется язык программирования </span><span style="font-size: 13px; color: #0000ff; background-color: #ffffff;"><a href="https://www.typescriptlang.org/" target="_blank" class="weblink">TypeScript</a></span><span style="font-size: 13px; color: #394149; background-color: #ffffff;">. Более подробно про принципы написания скриптов в ELMA365 читайте в </span><span style="font-size: 13px; color: #0563c1; background-color: #ffffff;"><a href="https://tssdk.elma365.com/ru/latest/index.html" target="_blank" class="weblink">справке ELMA365 TS SDK</a></span><span style="font-size: 13px; color: #394149; background-color: #ffffff;">.</span><span style="font-family: 'Times New Roman',Times,Georgia,serif;"> </span></li><li value="7" style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="color: #394149;"> Сохраните и опубликуйте метод.</span></li></ol>
|
||||
<h2 class="p_Heading2"><a id="access-to-global-constants" class="hmanchor"></a><span class="f_Heading2">Доступ к глобальным константам</span></h2>
|
||||
<p style="background: #ffffff; margin: 14px 0 0 0;"><span style="font-size: 15px; font-family: Inter;">По умолчанию в методах API можно обращаться только к компонентам модуля, на уровне которого они настраиваются. Вы можете дополнительно получить доступ к другим объектам системы через </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="global-constants.html" class="topiclink">глобальные константы</a></span><span style="font-size: 15px; font-family: Inter;">. Для этого в редакторе методов перейдите на вкладку </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Скрипты </span><span style="font-size: 15px; font-family: Inter;">и на верхней панели нажмите </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Настройки</span><span style="font-size: 15px; font-family: Inter;">.</span></p>
|
||||
<p style="background: #ffffff; margin: 14px 0 0 0;"><img alt="exten-17" width="798" height="161" style="margin:0;width:798px;height:161px;border:none" src="exten-17.png"/></p>
|
||||
<p style="page-break-after: avoid; background: #ffffff; margin: 14px 0 0 0;"><span style="font-size: 15px; font-family: Inter;">Вы можете использовать опции:</span></p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Глобальные константы</span><span style="font-size: 15px; font-family: Inter;"> — установите флажок напротив опции </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Global</span><span style="font-size: 15px; font-family: Inter;">, чтобы получить возможность обращаться к объектам из всех разделов системы и к глобальным параметрам. Для этого применяется константа </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="https://tssdk.elma365.com/ru/latest/pages/quick-start/intro_globals.html#global" target="_blank" class="weblink">Global</a></span><span style="font-size: 15px; font-family: Inter;">;</span></li></ul>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало внимание</span></p>
|
||||
<p class="p_Normal">When using the <code><b>Global</b></code> constant to write an API method, a module with this method cannot be <a href="export_extention.html" class="topiclink">exported</a>.</p>
|
||||
<p style="background: #ffffff; margin: 14px 0 0 0;"><span style="font-size: 15px; font-family: Inter;">При использовании константы </span><code><b>Global</b></code><span style="font-size: 15px; font-family: Inter; font-weight: bold;"> </span><span style="font-size: 15px; font-family: Inter;">для написания метода API модуль с этим методом нельзя </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="export_extention.html" class="topiclink">экспортировать</a></span><span style="font-size: 15px; font-family: Inter;">.</span></p>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец внимание</span></p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li class="p_Normal"><span style="font-weight: bold;">Optional dependencies (available in the Imports object)</span>. Select workspaces or custom modules and set <a href="optional-dependencies.html" class="topiclink">optional dependencies</a> with them. After that, they can be accessed in scripts via the <a href="optional-dependencies.html#use-imports" class="topiclink">Imports constant</a>.</li></ul>
|
||||
<p class="p_Normal" style="margin: 0 0 0 34px;">To create a dependency, click <span style="font-weight: bold;">+Add Workspace</span> and select a system component. Then, in the <span style="font-weight: bold;">Alias</span> column, set a unique name for it that will be used in the script. Latin letters and numbers are acceptable, and you can use an underscore to separate words. By default, the workspace code or module ID is used.</p>
|
||||
<h2 class="p_Heading2"><span class="f_Heading2">Use files in scripts</span></h2>
|
||||
<p class="p_Normal">You can use images, document templates, instructions, etc. in the module scripts. To do this, in the method editor, go to the <span style="font-weight: bold;">Files</span> tab and upload the required document.</p>
|
||||
<p class="p_Normal"><img alt="api_modules_02" width="1311" height="346" style="margin:0;width:1311px;height:346px;border:none" src="api_modules_02.png"/></p>
|
||||
<p class="p_Normal">Open the file in view mode and copy its identifier in the URL of the page. Using the identifier, you can refer to the uploaded file in any module script.</p>
|
||||
<h3 class="p_Heading3"><span class="f_Heading3">Server dependencies</span></h3>
|
||||
<p class="p_Normal">In BRIX On-Premises, you can add npm packages with server dependencies on the <span style="font-weight: bold;">Files</span> tab. Read more in the <a href="npm-package.html" class="topiclink">Server dependencies of npm packages</a> article.</p>
|
||||
<h2 class="p_Heading2"><a id="tracing" class="hmanchor"></a><span class="f_Heading2">Trace API methods</span></h2>
|
||||
<p class="p_Normal">If in <span style="font-weight: bold;">Administration > Developer Tools</span>, tracing is enabled for an API method, you can script execution. This helps you evaluate the duration of individual requests, optimize the code, and identify the causes of errors.</p>
|
||||
<p class="p_Normal">To view the list of traces, go to the the module settings and open the <span style="font-weight: bold;">API Methods</span> tab. To view the records:</p>
|
||||
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Опциональные зависимости (доступны в объекте Imports) </span><span style="font-size: 15px; font-family: Inter;">— выберите разделы или пользовательские модули и установите с ними </span><span style="font-size: 15px; font-family: Inter; color: #0000ff;"><a href="optional-dependencies.html" class="topiclink">опциональные зависимости</a></span><span style="font-size: 15px; font-family: Inter;">. После этого в скриптах к ним можно обращаться через константу </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="optional-dependencies.html#use-imports" class="topiclink">Imports</a></span><span style="font-size: 15px; font-family: Inter;">. При использовании опциональных зависимостей модуль можно экспортировать без ограничений.</span></li></ul>
|
||||
<p style="background: #ffffff; margin: 14px 0 0 34px;"><span style="font-size: 15px; font-family: Inter;">Чтобы создать зависимость, нажмите </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">+ Добавить раздел</span><span style="font-size: 15px; font-family: Inter;"> и выберите компонент системы. Затем в колонке </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Псевдоним</span><span style="font-size: 15px; font-family: Inter;"> задайте для него уникальное имя, которое будет использоваться в скрипте. Допустимы латинские буквы и цифры, для разделения слов можно использовать знак подчёркивания. По умолчанию используется код раздела или ID модуля.</span></p>
|
||||
<h2 class="p_Heading2"><span class="f_Heading2">Использование файлов в скриптах</span></h2>
|
||||
<p class="p_Normal">В скриптах модуля вы можете использовать изображения, шаблоны документов, инструкции и т. д. Для этого в редакторе методов перейдите на вкладку <span style="font-weight: bold;">Файлы</span> и загрузите необходимый документ.</p>
|
||||
<p class="p_Normal"><img alt="exten-18" width="799" height="186" style="margin:0;width:799px;height:186px;border:none" src="exten-18.png"/></p>
|
||||
<p class="p_Normal">Откройте файл в режиме просмотра и скопируйте его идентификатор в URL-адресе страницы. С помощью идентификатора вы можете обратиться к загруженному файлу в любых скриптах модуля.</p>
|
||||
<h3 class="p_Heading3"><span class="f_Heading3">Серверные зависимости</span></h3>
|
||||
<p class="p_Normal">В ELMA365 On-Premises вы можете добавлять на вкладке <span style="font-weight: bold;">Файлы</span> npm-пакеты с серверными зависимостями. Подробнее об этом читайте в статье <a href="npm-package.html" class="topiclink">«Серверные зависимости пакетов npm»</a>.</p>
|
||||
<h2 class="p_Heading2"><a id="tracing" class="hmanchor"></a><span class="f_Heading2">Трассировка методов API</span></h2>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Если для метода API включён сбор трейсов в разделе </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Администрирование > Инструменты разработчика</span><span style="font-size: 15px; font-family: Inter;">, вы можете проанализировать выполнение его скрипта. Это позволяет оценить продолжительность отдельных запросов, оптимизировать код и выявить причины ошибок. </span></p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Чтобы изучить трейсы, в настройках модуля перейдите на вкладку </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Методы API</span><span style="font-size: 15px; font-family: Inter;">. Для просмотра записей:</span></p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li class="p_Normal">By all module methods — click <span style="font-weight: bold;">View tracing</span> in the upper right corner of the page.</li><li class="p_Normal">By certain method — click <img alt="extention-api-3" width="25" height="23" style="margin:0;width:25px;height:23px;border:none" src="extention-api-3.png"/> next to the method.</li></ul>
|
||||
<p class="p_Normal">Read more about tracing settings and trace information in the <a href="server-script-tracing.html" class="topiclink">Trace server scripts</a> article.</p>
|
||||
<h2 class="p_Heading2"><a id="call-method" class="hmanchor"></a><span class="f_Heading2">Call an API method from a script</span></h2>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;">After creating an API method in a module, you can call it in any script of this module. To do that, use the <code><b>api</b></code> property of the <code><b>Namespace</b></code> global variable:</p>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">let response = await Namespace.api.some_method.call({</span><br />
|
||||
<span class="f_CodeExample"> method: "POST",</span><br />
|
||||
<span class="f_CodeExample"> headers: {</span><br />
|
||||
<span class="f_CodeExample"> "X-My-CutomHeader": "Some header data"</span><br />
|
||||
<span class="f_CodeExample"> },</span><br />
|
||||
<span class="f_CodeExample"> query: {</span><br />
|
||||
<span class="f_CodeExample"> "skip": "0",</span><br />
|
||||
<span class="f_CodeExample"> "take": "10"</span><br />
|
||||
<span class="f_CodeExample"> }, body: "Any body here"</span><br />
|
||||
<li style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-size: 15px; font-family: Inter;">по всем методам в модуле — в правом верхнем углу страницы нажмите </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Посмотреть трассировку</span><span style="font-size: 15px; font-family: Inter;">;</span></li><li style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-size: 15px; font-family: Inter;">по определённому методу — нажмите напротив него значок </span><img alt="tracing-api-method-icon" width="25" height="23" style="margin:0;width:25px;height:23px;border:none" src="tracing-api-method-icon.png"/><span class="f_ImageCaption">. </span></li></ul>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Подробнее о настройке трассировки и информации в карточке трейса читайте в статье </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="server-script-tracing.html" class="topiclink">«Трассировка серверных скриптов»</a></span><span style="font-size: 15px; font-family: Inter;">.</span></p>
|
||||
<h2 class="p_Heading2"><a id="api_call" class="hmanchor"></a><span class="f_Heading2">Вызов метода API из кода скрипта</span></h2>
|
||||
<p class="p_Normal">После создания метода API в модуле вы можете вызвать его в любом скрипте этого модуля. Для этого в глобальной переменной <code><b>Namespace</b></code> есть свойство <code><b>api</b></code>:</p>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">let response = await Namespace.api.some_method.call({</span><br />
|
||||
<span class="f_CodeExample"> method: "POST",</span><br />
|
||||
<span class="f_CodeExample"> headers: {</span><br />
|
||||
<span class="f_CodeExample"> "X-My-CutomHeader": "Some header data"</span><br />
|
||||
<span class="f_CodeExample"> },</span><br />
|
||||
<span class="f_CodeExample"> query: {</span><br />
|
||||
<span class="f_CodeExample"> "skip": "0",</span><br />
|
||||
<span class="f_CodeExample"> "take": "10"</span><br />
|
||||
<span class="f_CodeExample"> },</span><br />
|
||||
<span class="f_CodeExample"> body: "Any body here"</span><br />
|
||||
<span class="f_CodeExample">});</span></p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="color: #394149;">The </span><code><b>HttpApiRequest</b></code><span style="font-size: 13px;"> </span><span style="color: #394149;">type is sent to the method. It extends the </span><code><b>FetchRequest</b></code><span style="color: #394149;"> type and is used in the </span><code><b>fetch()</b></code><span style="color: #394149;"> method.</span></p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="color: #394149;">When the </span><code><b>call()</b></code><span style="color: #394149;"> method is called, a web call to the API method is made using the standard HTTP protocol. Therefore, the response from the method comes as a standard </span><code><b>FetchResponse</b></code><span style="color: #394149;"> object.</span></p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="color: #394149;">To configure modules with webhooks, you can get an API method address using the </span><code><b>Namespace.api.some_method.getUrl()</b></code><span style="color: #394149;"> command. It will return a string with the full address of this method for further calling. This method is useful when an external service requires you to specify a return address for a call.</span></p>
|
||||
<h2 class="p_Heading2"><span class="f_Heading2">Call an API method from an external system</span></h2>
|
||||
<p class="p_Normal">An API method in the module can be called from an external service. To do this, a direct link to the created method in the form of a full URL is specified in the web request.</p>
|
||||
<p class="p_Normal">To get the link, open the module settings page and go to the <span style="font-weight: bold;">API Methods</span> tab. Next to the method name, click the URL copy icon.</p>
|
||||
<p class="p_Normal"><img alt="api_modules_03" width="922" height="380" style="margin:0;width:922px;height:380px;border:none" src="api_modules_03.png"/></p>
|
||||
<p>If the external authentication option is selected when creating a method, the request uses the <code><b>Authorization</b></code> header and specifies an individual user token. Read more on the <a href="https://api.brix365.com/en/public-api/guides/WebAPIAuthorization/" target="_blank" class="weblink">BRIX public API</a> page.</p>
|
||||
<p>Here is an example of calling an API method in a module via the <code><b>fetch</b></code> command:</p>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">let</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">response</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">=</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">await</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">fetch('https://abcd1234.brix365.en/api/extensions/f1e6cf15-7c65-4be5-8443-021a280dcd80/script/upload',</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">{</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">method:</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">"POST",</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">headers:</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">{</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">"Authorization":</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">"Bearer "</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">+</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">secureToken</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">},</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">query:</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">{</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">"file_id":</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">fileId</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">},</span><br />
|
||||
<span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">body:</span><span class="f_CodeExample" style="color: #ffffff;"> </span><span class="f_CodeExample">JSON.stringify(uploadBody)</span><br />
|
||||
<p class="p_Normal">В метод передаётся тип <code><b>HttpApiRequest</b></code>. Он расширяет тип <code><b>FetchRequest</b></code>, он же используется в методе <code><b>fetch()</b></code>.</p>
|
||||
<p class="p_Normal">При вызове метода <code><b>call()</b></code> происходит веб-вызов метода API через стандартный протокол HTTP. Поэтому ответ от метода приходит в виде стандартного объекта <code><b>FetchResponse</b></code>. </p>
|
||||
<p class="p_Normal">Также для разработки модулей с вебхуками можно получить адрес метода API с помощью команды <code><b>Namespace.api.some_method.getUrl()</b></code>, которая вернёт строку с полным адресом этого метода для дальнейшего вызова. Этот метод бывает полезен, когда во время работы сторонний сервис требует указать обратный адрес для вызова.</p>
|
||||
<h2 class="p_Heading2"><a id="api-call-from-external-service" class="hmanchor"></a><span class="f_Heading2">Вызов метода API из сторонней системы</span></h2>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;">Метод API в модуле можно вызвать из стороннего сервиса. Для этого в веб-запросе указывается прямая ссылка на созданный метод в виде полного URL-адреса. </p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;">Чтобы получить ссылку, откройте страницу управления модулем и перейдите на вкладку <span style="font-weight: bold;">Методы API</span>. Напротив названия метода нажмите на значок копирования URL-адреса.</p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><img alt="extention-api-5" width="737" height="315" style="margin:0;width:737px;height:315px;border:none" src="extention-api-5.png"/></p>
|
||||
<p style="background: #ffffff; margin: 0 0 7px 0;"><span style="color: #212529;">Если при создании метода выбрана опция внешней авторизации, в запросе используется заголовок </span><code><b>Authorization</b></code><span style="color: #212529;"> и указывается индивидуальный токен пользователя. Подробнее об этом читайте в </span><a href="https://api.elma365.com/ru/public-api/guides/WebAPIAuthorization/" target="_blank" class="weblink">справке по публичному API ELMA365</a><span style="color: #212529;">. </span></p>
|
||||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="background-color: #ffffff;">Пример вызова метода API в модуле </span><span style="color: #212529;">через метод </span><code><b>fetch()</b></code><span style="background-color: #ffffff;">:</span></p>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">let response = await fetch('https://abcd1234.elma365.ru/api/extensions/f1e6cf15-7c65-4be5-8443-021a280dcd80/script/upload', {</span><br />
|
||||
<span class="f_CodeExample"> method: "POST",</span><br />
|
||||
<span class="f_CodeExample"> headers: {</span><br />
|
||||
<span class="f_CodeExample"> "Authorization": "Bearer " + secureToken</span><br />
|
||||
<span class="f_CodeExample"> },</span><br />
|
||||
<span class="f_CodeExample"> query: {</span><br />
|
||||
<span class="f_CodeExample"> "file_id": fileId</span><br />
|
||||
<span class="f_CodeExample"> },</span><br />
|
||||
<span class="f_CodeExample"> body: JSON.stringify(uploadBody)</span><br />
|
||||
<span class="f_CodeExample">});</span></p>
|
||||
<h2 class="p_Heading2"><span class="f_Heading2">Service headers</span></h2>
|
||||
<p style="line-height: 1.20; margin: 0 0 11px 0;"><span style="font-family: Inter; color: #394149;">In API methods, each request object passed into a script contains headers that store information about the invoked method:</span></p>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примечание</span></p>
|
||||
<p class="p_Normal"><span style="font-weight: bold;">Примечание</span></p>
|
||||
<p class="p_Normal">Если в пути к методу API встречается несколько стоящих подряд символов <span style="font-weight: bold;">/</span>, они интерпретируются как один.</p>
|
||||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примечание</span></p>
|
||||
<h2 class="p_Heading2"><span class="f_Heading2">Служебные заголовки </span></h2>
|
||||
<p class="p_Normal">В методах API в каждом объекте запроса, который передаётся в скрипт, содержатся заголовки, хранящие информацию о вызванном методе: </p>
|
||||
<ul style="list-style-type:disc">
|
||||
<li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>:method</b></code><span style="font-family: Inter; color: #394149;">. The HTTP method.</span></li><li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>:path</b></code><span style="font-family: Inter; color: #394149;">. The part of the URL method address that comes after the domain, along with query parameters. For example, </span><code><b>/test1/test2?q=12345&n=aaa</b></code><span style="font-family: Inter; color: #394149;">.</span></li><li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>:scheme</b></code><span style="font-family: Inter; color: #394149;">. The protocol used in the method: either </span><code><b>http</b></code><span style="font-family: Inter; color: #394149;"> or </span><code><b>https</b></code><span style="font-family: Inter; color: #394149;">.</span></li><li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>:authority</b></code><span style="font-family: Inter; color: #394149;">. The domain and port (excluding 80 and 443), from which the request originated, for example, </span><code><b>brix365.com</b></code><span style="font-family: Inter; color: #394149;"> or </span><code><b>local.brix365.dev:4200</b></code><span style="font-family: Inter; color: #394149;">.</span></li></ul>
|
||||
<li class="p_Normal"><code><b>:method</b></code> — http-метод; </li><li class="p_Normal"><code><b>:path</b></code> — часть URL‑адреса метода, которая приводится после домена, вместе с query-параметрами, например, <code><b>/test1/test2?q=12345&n=aaa</b></code>; </li><li class="p_Normal"><code><b>:scheme</b></code> — используемый в методе протокол: http или https; </li><li class="p_Normal"><code><b>:authority</b></code> — домен и порт (кроме 80 и 443), с которого пришёл запрос, например, <code><b>elma365.ru</b></code> или <code><b>local.elma365.dev:4200</b></code>. </li></ul>
|
||||
|
||||
<div class="bottom-nav">
|
||||
|
||||
@ -205,7 +211,7 @@ Note, the <code><b>/</b></code> and <code><b>*</b></code> characters at the end
|
||||
|
||||
</div>
|
||||
<!-- добавляет на страницу строку блок Была ли статья полезной? -->
|
||||
<div class="feedback" id="feedback"><div class="feedback-help"><span><b>Was this helpful?</b></span><form action="" method="POST" class="feedback-form" id="feedback-form"><div class="feedback__popup feedback__popup-response" id="feedback__popup_thx" style="display: none;">Thanks for your feedback!</div><div class="feedback__popup" id="feedback__popup_why" style="display: none;"><div class="feedback__popup-header">Please specify why:</div><input type="radio" name="category" id="bad_recommendation" value="bad_recommendation"><label for="bad_recommendation">Recommendations did not help me</label><input type="radio" name="category" id="difficult_text" value="difficult_text"><label for="difficult_text">Article is hard to understand</label><input type="radio" name="category" id="no_answer" value="no_answer"><label for="no_answer">Didn`t answer my question</label><input type="radio" name="category" id="bad_header" value="bad_header"><label for="bad_header">Content does not match the topic</label><input type="radio" name="category" id="other_reason" value="other_reason"><label for="other_reason">Other</label></div><div class="feedback__popup" id="feedback__popup-other" style="display: none;"><div class="feedback__popup-header">How we can improve it?</div><textarea class="feedback__textarea" name="other" id=""></textarea><input type="submit" class="feedback__other-btn" value="Submit"></div><div class="feedback-form__btn-group"><input type="radio" name="useful" id="feedback__useful_yes" value="true"><label for="feedback__useful_yes"><img src="like.svg" class="small-img" alt="like"><spanclass="feedback-form__btn-group_yes-btn">Yes</spanclass="feedback-form__btn-group_yes-btn"></label><input type="radio" name="useful" id="feedback__useful_no" value="false"><label for="feedback__useful_no"><img src="dislike.svg" class="small-img" alt="dislike"><spanclass="feedback-form__btn-group_no-btn">No</spanclass="feedback-form__btn-group_no-btn"></label></div><select name="category"><option disabled="">Please specify why</option><option value="bad_recommendation" selected="">Recommendations did not help me</option><option value="difficult_text">Article is hard to understand</option><option value="no_answer">Didn`t answer my question</option><option value="bad_header">Content does not match the topic</option><option value="other_reason">Other</option></select><input type="submit"></form></div><div class="found_typo"><p style="margin: 0px; margin-top: 16px !important;"><span><b>Found a typo?</b></span> Select it and press <i>Ctrl+Enter</i> to send us feedback</p></div></div>
|
||||
<div class="feedback-wrap"><div class="feedback" id="feedback"><span><b>Была ли статья полезной?</b></span><form action="" method="POST" class="feedback-form" id="feedback-form"><div class="feedback__popup feedback__popup-response" id="feedback__popup_thx">Спасибо за ваш отзыв!</div><div id="feedback-success-popup"><div class="wrap"><button type="button" class="feedback-popup-close">×</button><svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_212_2187)"><path d="M22 0.6875C10.2294 0.6875 0.6875 10.2294 0.6875 22C0.6875 33.7706 10.2294 43.3125 22 43.3125C33.7706 43.3125 43.3125 33.7706 43.3125 22C43.3125 10.2294 33.7706 0.6875 22 0.6875ZM22 40.5625C11.8023 40.5625 3.4375 32.3078 3.4375 22C3.4375 11.8024 11.6922 3.4375 22 3.4375C32.1977 3.4375 40.5625 11.6922 40.5625 22C40.5625 32.1976 32.3078 40.5625 22 40.5625ZM34.1713 16.933L18.6613 32.3186C18.257 32.7197 17.604 32.7171 17.203 32.3128L9.82283 24.873C9.42176 24.4686 9.42434 23.8157 9.82867 23.4146L10.5609 22.6884C10.9652 22.2873 11.6181 22.2899 12.0192 22.6942L17.9468 28.6697L31.9926 14.7366C32.3969 14.3356 33.0498 14.3382 33.4509 14.7425L34.1772 15.4747C34.5783 15.879 34.5757 16.532 34.1713 16.933Z" fill="#27AE60"></path></g><defs><clipPath id="clip0_212_2187"><rect width="44" height="44" fill="white"></rect></clipPath></defs></svg><p>Ваш отзыв успешно отправлен!</p><span>Спасибо за обратную связь.</span></div></div><div class="feedback__popup" id="feedback__popup_why"><button type="button" class="feedback-popup-close">×</button><div class="feedback__popup-header">Уточните, почему:</div><input type="radio" name="category" id="bad_recommendation" value="bad_recommendation"><label for="bad_recommendation">Рекомендации не помогли</label><input type="radio" name="category" id="difficult_text" value="difficult_text"><label for="difficult_text">Текст трудно понять</label><input type="radio" name="category" id="no_answer" value="no_answer"><label for="no_answer">Нет ответа на мой вопрос</label><input type="radio" name="category" id="bad_header" value="bad_header"><label for="bad_header">Содержание статьи не соответствует заголовку</label><input type="radio" name="category" id="other_reason" value="other_reason"><label for="other_reason">Другая причина</label></div><div class="feedback__popup" id="feedback__popup-other"><button type="button" class="feedback-popup-close">×</button> <div class="feedback__popup-header">Расскажите, что вам не понравилось в статье:</div><textarea class="feedback__textarea" name="other" id=""></textarea><input type="submit" class="feedback__other-btn" value="Отправить"></div><div class="feedback-form__btn-group"><input type="radio" name="useful" id="feedback__useful_yes" value="true"><label for="feedback__useful_yes"><img src="like.svg"/><span class="feedback-form__btn-group_yes-btn">Да</span></label><input type="radio" name="useful" id="feedback__useful_no" value="false"><label for="feedback__useful_no"><img src="dislike.svg"/><span class="feedback-form__btn-group_no-btn">Нет</span></label></div><select name="category"><option disabled>Выберите вариант</option><option value="bad_recommendation" selected>Рекомендации не помогли</option><option value="difficult_text">Текст трудно понять</option><option value="no_answer">Нет ответа на мой вопрос</option><option value="bad_header">Содержание статьи не соответствует заголовку</option><option value="other_reason">Другая причина</option></select><input type="submit"></form></div></div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
@ -213,7 +219,7 @@ Note, the <code><b>/</b></code> and <code><b>*</b></code> characters at the end
|
||||
<input type="checkbox" />
|
||||
<div class="article__arrow"></div>
|
||||
<div class="table-of-contents elma365-right" id="toc2Content">
|
||||
<h3 class="h3-toc">In this topic</h3>
|
||||
<h3 class="h3-toc">В этой статье</h3>
|
||||
<nav id="toc2"></nav>
|
||||
</div>
|
||||
</aside>
|
||||
@ -224,30 +230,63 @@ Note, the <code><b>/</b></code> and <code><b>*</b></code> characters at the end
|
||||
<div class="footer-container">
|
||||
<div class="footer-mobile">
|
||||
|
||||
<ul class="footer-mobile__list"><li><a href="https://brix365.com/en/" target="_blank">BRIX</a></li><li><a href="https://tssdk.brix365.com/en/latest/" target="_blank">SDK</a></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li></ul><ul class="footer-mobile__list"><li><a href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li></ul>
|
||||
<ul class="footer-mobile__list"><li><a href="https://api.elma365.com/ru/" target="_blank">API</a></li><li><a href="https://tssdk.elma365.com/" target="_blank">TS SDK</a></li><li><a href="https://community.elma365.com/" target="_blank">Community</a></li><li><a href="https://elma-academy.com/ru/elma365" target="_blank">Академия</a></li></ul><ul class="footer-mobile__list"><li><a href="https://elma365.com/ru/help/platform/get-trial.html">Платформа</a></li><li><a href="https://elma365.com/ru/help/ecm/ecm-functions.html">ECM</a></li><li><a href="https://elma365.com/ru/help/service/service-functions.html">Service</a></li><li><a href="https://elma365.com/ru/help/projects/projects-functions.html">Проекты</a></li></ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-wrap">
|
||||
|
||||
<div><span class="mobile-question-popup">Send feedback</span><form method="POST" action class="question__popup question-xs" id="question__popup"><div class="question-wrap"><span class="close"></span><span class="title">Ask a question</span><label for="help_question" style="display: none;"></label><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Send"></div></form><div class="hidden fade-in question-success-xs">Sent</div></div>
|
||||
|
||||
<div class="footer-flex-b">
|
||||
<span class="footer-copy">© 2025 BRIX</span>
|
||||
<ul class="footer-list">
|
||||
|
||||
<li class="footer-item">
|
||||
<a href="#" class="arrow-top" style="display: block;"></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="container">
|
||||
<div class="footer-wrap">
|
||||
|
||||
<div><span class="mobile-question-popup">Отправить фидбэк</span><form method="POST" action class="question__popup question-xs" id="question__popup"><div class="question-wrap"><span class="close"></span><span class="title">Задать вопрос</span><label for="help_question" style="display: none;"></label><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Отправить"></div></form><div class="hidden fade-in question-success-xs">Ваш фидбэк отправлен.</div></div>
|
||||
|
||||
<div class="footer-flex-b">
|
||||
<div class="footer-top">
|
||||
<span class="footer-copy">© 2025
|
||||
ELMA365
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
<a href="https://navigator.sk.ru/orn/1122971" target="_blank">
|
||||
<img src="sk-resident.svg" alt="sk icon" class="footer-img" width="117" height="34">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="footer-line">
|
||||
|
||||
<div class="footer-line-copy">
|
||||
<span class="footer-copy">© 2025
|
||||
ELMA365
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ul class="footer-list">
|
||||
|
||||
<li class="footer-item"><a href="https://elma365.com/ru/" target="_blank" class="footer-link" style="color: #0D4A75;"><img src="browse.svg" alt="browse icon" class="footer-img">elma365.com</a></li><li class="footer-item"><a href="https://www.youtube.com/user/ELMABPM" target="_blank" class="footer-link"><img src="yt.svg" alt="youtube icon" class="footer-img"></a></li><li class="footer-item"><a href="https://vk.com/elma_bpm" target="_blank" class="footer-link"><img src="vk.svg" alt="vk icon" class="footer-img"></a></li><li class="footer-item"><a href="https://t.me/elmaday" target="_blank" class="footer-link"><img src="tg.svg" alt="telegram icon" class="footer-img"></a></li><li class="footer-item"><a href="https://dzen.ru/elma" target="_blank" class="footer-link"><img src="dzen.svg" alt="dzen icon" class="footer-img"></a></li>
|
||||
|
||||
|
||||
<li class="footer-item">
|
||||
<a href="https://navigator.sk.ru/orn/1122971" target="_blank">
|
||||
<img src="sk-resident.svg" alt="sk icon" class="footer-img" width="117" height="34">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="arrow-top"></a>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
<!-- <script type="text/javascript" src="jquery1.min.js"></script>-->
|
||||
<iframe name="hmnavigation" style="display:none!important"></iframe>
|
||||
<script src="./jquery-ui.js"></script>
|
||||
<!--<script src="./jquery-ui.js"></script> -->
|
||||
<script src="./jquery-ui.min.js"></script>
|
||||
<!--script src="//cdn.jsdelivr.net/npm/featherlight@1.7.14/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script-->
|
||||
<script src="./jquery.tocify.min.js"></script>
|
||||
<script src="./TypoReporter.min.js"></script>
|
||||
|
Reference in New Issue
Block a user