{"id":304537,"date":"2020-05-30T09:00:14","date_gmt":"2020-05-30T09:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304537"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304537","title":{"rendered":"\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0432 Atlassian Confluence \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 REST \u0437\u0430\u043f\u0440\u043e\u0441\u0430"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/504566\/\">\u041f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Atlassian Confluence \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0437 REST \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>  \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Confluence \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432 Jira. \u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u0437 Jira \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/docs.atlassian.com\/software\/jira\/docs\/api\/REST\/8.9.0\/#api\/2\/project-getAllProjects\" rel=\"nofollow\">project<\/a> \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e Jira REST API.<br \/>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u043e\u0442 <a href=\"https:\/\/youtu.be\/ITfDmNdL82k\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Power Scripts for Confluence<\/h2>\n<p>  \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u044b\u0437\u043e\u0432 Jira REST API \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <a href=\"https:\/\/marketplace.atlassian.com\/apps\/1219507\/power-scripts-for-confluence?hosting=server&amp;amp;tab=overview\" rel=\"nofollow\">Power Scripts for Confluence<\/a>. \u042d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0412\u0430\u043c \u0441\u0442\u043e\u0438\u0442\u044c.<br \/>  \u041d\u0443, \u0438 \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d Power Scripts for Confluence \u0432 \u043d\u0430\u0448 Confluence. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u043e\u0442 <a href=\"https:\/\/confluence.cprime.io\/pages\/viewpage.action?pageId=32817105\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0430 -&gt; Manage apps -&gt; SIL Manager.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cf\/p0\/rs\/cfp0rs6wpqyi7poq-gzue4krfpa.png\"><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b getProjects.sil \u0432\u043e\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code class=\"java\">struct Project {     string key;     string name;     string projectTypeKey; }  HttpRequest request; HttpHeader authHeader = httpBasicAuthHeader(&quot;admin&quot;, &quot;admin&quot;); request.headers += authHeader;   Project &#91;] projects = httpGet(&quot;http:\/\/host.docker.internal:8080\/rest\/api\/2\/project&quot;, request); runnerLog(projects); return projects;<\/code><\/pre>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 <a href=\"http:\/\/host.docker.internal\" rel=\"nofollow\">host.docker.internal<\/a>:8080\/ \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0412\u0430\u0448\u0435\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 Jira.<br \/>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0438\u0437 Jira:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3e\/f0\/ue\/3ef0ue1q7kzhg3fkdl1bi7ighw4.png\"><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Confluence<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Confluence \u0441 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c <a href=\"https:\/\/confluence.cprime.io\/display\/PSCONF\/TableScriptMacro\" rel=\"nofollow\">SIL table<\/a>. \u0412 \u043f\u043e\u043b\u0435 scripts \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 getProjects.sil:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5r\/nh\/9t\/5rnh9t3nhjkgcxyc9xcn17qosxg.png\"><\/p>\n<p>  \u041e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7f\/sw\/q5\/7fswq5klwzqw8zfguljbvdorugw.png\"><\/p>\n<h2>\u0423\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443<\/h2>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c:  <\/p>\n<ul>\n<li>\u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/li>\n<li>\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044f\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043d\u0435\u0441\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442 getProjects.sil.<br \/>  \u0417\u0430\u043e\u0434\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043c.<br \/>  \u0412\u043e\u0442 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442:  <\/p>\n<ul>\n<li>\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438\u0437 Jira \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 Jira REST API<\/li>\n<li>\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434<\/li>\n<li>\u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/li>\n<\/ul>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"java\">Project &#91;] projects = getProjectData(); TableRow &#91;] tableRows =  convertProjectDataToTableData(projects);  return tableRows;<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445:  <\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0445\u0435\u0434\u0435\u0440 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 Jira<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 expand \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u043e \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c Jira, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 expand<\/li>\n<li>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441<\/li>\n<li>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435<\/li>\n<\/ul>\n<p>  \u0410 \u0432\u043e\u0442 \u0441\u043b\u043e\u0432\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"java\">function getProjectData() {     HttpRequest request;     HttpHeader authHeader = httpBasicAuthHeader(&quot;admin&quot;, &quot;admin&quot;);     request.headers += authHeader;     HttpQueryParam param = httpCreateParameter(&quot;expand&quot;, &quot;description,lead,url,projectKeys&quot;);     request.parameters += param;     Project&#91;] projects = httpGet(&quot;http:\/\/host.docker.internal:8080\/rest\/api\/2\/project&quot;, request);     return projects; }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. <br \/>  \u0412\u043e\u0442 \u043e\u0442\u0432\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 project \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 Jira REST API(\u044f \u0443\u0434\u0430\u043b\u0438\u043b \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043a\u043e\u0440\u043e\u0447\u0435 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c):<\/p>\n<pre><code class=\"json\">&#91;    {       &quot;key&quot;:&quot;KAN&quot;,       &quot;lead&quot;:{          &quot;name&quot;:&quot;admin&quot;,          &quot;displayName&quot;:&quot;Alexey Matveev&quot;,       },       &quot;name&quot;:&quot;kanban&quot;,       &quot;projectTypeKey&quot;:&quot;software&quot;    },    {       &quot;key&quot;:&quot;SCRUM&quot;,       &quot;description&quot;:&quot;&quot;,       &quot;lead&quot;:{          &quot;name&quot;:&quot;admin&quot;,          &quot;displayName&quot;:&quot;Alexey Matveev&quot;,       },       &quot;name&quot;:&quot;scrum&quot;,       &quot;projectTypeKey&quot;:&quot;software&quot;    } ]<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439 key, name \u0438 projectTypeKey \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043d\u0430\u0448\u0435\u0433\u043e json. \u0410 \u0432\u043e\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u044f lead \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u0432\u0438\u0434\u0438\u043c json. \u0410 \u044d\u0442\u043e\u0442 json \u0443\u0436\u0435 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 name \u0438 displayName. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f json \u0432 \u043f\u043e\u043b\u0435 lead (Lead):<\/p>\n<pre><code class=\"java\">struct Lead {     string name;     string displayName; }<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043d\u0430\u0448\u0435\u0433\u043e json (Project):<\/p>\n<pre><code class=\"java\">struct Project {     string key;     string name;     string projectTypeKey;     Lead lead; }<\/code><\/pre>\n<p>  \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441 SIL table \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 json \u0441 \u043e\u0434\u043d\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u0443\u0440\u043e\u0432\u043d\u044f\u043c\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (Project) \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441 \u043e\u0434\u043d\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (\u043f\u043b\u043e\u0441\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443). \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043b\u043e\u0441\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 (TableRow):<\/p>\n<pre><code class=\"java\">struct TableRow {     string key;     string name;     string projectTypeKey;     string lead;     string leadDisplayName; }<\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 Project \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 TableRow:<\/p>\n<pre><code class=\"java\">function convertProjectDataToTableData(Project &#91;] projectData) {     TableRow &#91;] tableRows;     for (Project project in projectData) {         TableRow tableRow;         tableRow.key = project.key;         tableRow.name = project.name;         tableRow.projectTypeKey = project.projectTypeKey;         tableRow.lead = project.lead.name;         tableRow.leadDisplayName = project.lead.displayName;         tableRows = arrayAddElement(tableRows, tableRow);     }      return tableRows; }<\/code><\/pre>\n<p>  \u0412\u0441\u0435. \u0421\u043a\u0440\u0438\u043f\u0442 \u0433\u043e\u0442\u043e\u0432!<br \/>  \u0412\u043e\u0442 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 getProjects.sil:<\/p>\n<pre><code class=\"json\">struct Lead {     string name;     string displayName; }  struct Project {     string key;     string name;     string projectTypeKey;     Lead lead; }  struct TableRow {     string key;     string name;     string projectTypeKey;     string lead;     string leadDisplayName; }  function getProjectData() {     HttpRequest request;     HttpHeader authHeader = httpBasicAuthHeader(&quot;admin&quot;, &quot;admin&quot;);     request.headers += authHeader;     HttpQueryParam param = httpCreateParameter(&quot;expand&quot;, &quot;description,lead,url,projectKeys&quot;);     request.parameters += param;     string pp = httpGet(&quot;http:\/\/host.docker.internal:8080\/rest\/api\/2\/project&quot;, request);     runnerLog(pp);     Project&#91;] projects = httpGet(&quot;http:\/\/host.docker.internal:8080\/rest\/api\/2\/project&quot;, request);     return projects; }  function convertProjectDataToTableData(Project &#91;] projectData) {     TableRow &#91;] tableRows;     for (Project project in projectData) {         TableRow tableRow;         tableRow.key = project.key;         tableRow.name = project.name;         tableRow.projectTypeKey = project.projectTypeKey;         tableRow.lead = project.lead.name;         tableRow.leadDisplayName = project.lead.displayName;         tableRows = arrayAddElement(tableRows, tableRow);     }      return tableRows; }Project &#91;] projects = getProjectData(); TableRow &#91;] tableRows =  convertProjectDataToTableData(projects);  return tableRows; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Confluence \u0438 \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u043b\u0438\u0441\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ru\/hk\/8v\/ruhk8vmn3ebygvpsejcsvod7mbe.png\"><\/p>\n<p>  \u041d\u043e \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0435\u0432\u0440\u0430\u0437\u0443\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0430\u0434\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0438\u043c\u0435\u043d\u0430.<br \/>  \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u043a\u0440\u043e\u0441 SIL table \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u00ab\u041a\u043b\u044e\u0447 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0422\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0424\u0418\u041e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u00bb \u0432 \u043f\u043e\u043b\u0435 columns:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fa\/jp\/om\/fajpom05uedpykk7mb8y_g6na9i.png\"><\/p>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u0432\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oe\/rp\/ls\/oerpls3m57fijobzqps8krnap-m.png\"><\/p>\n<p>  \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c!<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/504566\/\"> https:\/\/habr.com\/ru\/post\/504566\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/504566\/\">\u041f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Atlassian Confluence \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0437 REST \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>  \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Confluence \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432 Jira. \u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u0437 Jira \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/docs.atlassian.com\/software\/jira\/docs\/api\/REST\/8.9.0\/#api\/2\/project-getAllProjects\" rel=\"nofollow\">project<\/a> \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e Jira REST API.<br \/>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u043e\u0442 <a href=\"https:\/\/youtu.be\/ITfDmNdL82k\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304537","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304537"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304537\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}