{"componentChunkName":"component---src-templates-microservices-js","path":"/en/microservices/instancecreate/","result":{"data":{"markdownRemark":{"html":"<h2 id=\"post\"><a href=\"#post\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>POST</h2>\n<h3 id=\"uri\"><a href=\"#uri\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>URI</h3>\n<p><code class=\"gatsby-code-text\">http://{server}:{port}/manager/web/api/service/instances</code></p>\n<h3 id=\"method\"><a href=\"#method\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Method</h3>\n<p>POST</p>\n<h3 id=\"parent-resource\"><a href=\"#parent-resource\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Parent Resource</h3>\n<p>service</p>\n<h3 id=\"introduction\"><a href=\"#introduction\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction</h3>\n<p>Publish service instance by API.</p>\n<p>Supported Interchange Format: JSON</p>\n<h3 id=\"http-request-method\"><a href=\"#http-request-method\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>HTTP Request Method</h3>\n<p>Execute HTTP request to the URI below. In the URI below, <code class=\"gatsby-code-text\">{server}</code> is the server of gateway, replace it by the actual gateway IP. <code class=\"gatsby-code-text\">{port}</code> is the port of gateway, replace it by the actual gateway port.</p>\n<p><code class=\"gatsby-code-text\">http://{server}:{port}/manager/web/api/service/instances</code></p>\n<h4 id=\"post-request\"><a href=\"#post-request\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>POST Request</h4>\n<p>Publish the service instance.</p>\n<h4 id=\"the-format-of-headers\"><a href=\"#the-format-of-headers\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The Format of Headers</h4>\n<div class=\"gatsby-highlight\" data-language=\"jsxon\"><pre class=\"gatsby-code-jsxon\"><code class=\"gatsby-code-jsxon\">content-type: application/json\nauthorization: Bearer {access_token}</code></pre></div>\n<h4 id=\"request-params\"><a href=\"#request-params\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Request Params</h4>\n<p>The necessary parameters to publish the service instance:</p>\n<table>\n<col style=\"width: 20%;\" />\n<col style=\"width: 20%;\" />\n<col style=\"width: 60%;\" />\n\t<tr class=\"t1st\">\n\t\t<th>Name</th>\n\t\t<th>Type</th>\n\t\t<th>Explanation</th>\n\t</tr>\n\t<tr class=\"t2Row\">\n\t\t<td>dataSource</td>\n\t\t<td>String</td>\n\t\t<td>The type of datasource(please refer <a href=\"../service/\">API > service</a> to check the name of datasource types)</td>\n\t</tr>\n\t<tr class=\"t1Row\">\n\t\t<td>serviceTypes</td>\n\t\t<td>String[]</td>\n\t\t<td>The type of service(please refer <a href=\"../service/\">API > service</a> to check the name of service types)</td>\n\t</tr>\n\t<tr class=\"t1Row\">\n\t\t<td>nodeType</td>\n\t\t<td>String</td>\n\t\t<td>The type of node(please refer <a href=\"../service/\">API > service</a> to check the name of node types)</td>\n\t</tr>\n\t<tr class=\"t2Row\">\n\t\t<td>nodeNames</td>\n\t\t<td>String[]</td>\n\t\t<td>The name of service node. Fill in an existing node or create a new one.</td>\n\t</tr>\n\t<tr class=\"t1Row\">\n\t\t<td>isCreateNode</td>\n\t\t<td>Boolean</td>\n\t\t<td>Whether to create a new node</td>\n\t</tr>\n\t<tr class=\"t2Row\">\n\t\t<td>serviceXml</td>\n\t\t<td>String</td>\n\t\t<td>Customize service configuration(please refer to SuperMap iServer Documentation)</td>\n\t</tr>\n\t<tr class=\"t1Row\" style=\"height: 0px;\">\n\t\t<td>settings</td>\n\t\t<td>String</td>\n\t\t<td>Config service according to the datasource type and service type.</td>\n\t</tr>\n</table>\n<h4 id=\"response-structure\"><a href=\"#response-structure\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Response Structure</h4>\n<p>The returned response would tell whether published successful, and provide the error information if failed.</p>\n<table>\n<col style=\"width: 20%;\" />\n<col style=\"width: 20%;\" />\n<col style=\"width: 20%;\" />\n<col style=\"width: 40%;\" />\n\t<tr class=\"t1st\" style=\"height: 34px;\">\n\t\t<th colspan=\"2\">Field</th>\n\t\t<th>Type</th>\n\t\t<th>Explanation</th>\n\t</tr>\n\t<tr class=\"t2Row\" style=\"height: 37px;\">\n\t\t<td colspan=\"2\">isSucceed</td>\n\t\t<td>Boolean</td>\n\t\t<td>The result of the request. True means succeed, false means failed</td>\n\t</tr>\n\t<tr class=\"t1Row\" style=\"height: 37px;\">\n\t\t<td colspan=\"2\">msg</td>\n\t\t<td>String</td>\n\t\t<td>If the execution failed, the result would return the error information. The result would be empty if succeed.</td>\n\t</tr>\n\t<tr class=\"t2Row\" style=\"height: 33px;\">\n\t\t<td rowspan=\"2\">serviceInfos</td>\n\t\t<td>componentName</td>\n\t\t<td rowspan=\"2\">String</td>\n\t\t<td>The name of the service component</td>\n\t</tr>\n\t<tr class=\"t1Row\" style=\"height: 34px;\">\n\t\t<td>interfaceName</td>\n\t\t<td>The name of the service interface</td>\n\t</tr>\n</table>\n<h4 id=\"response-case\"><a href=\"#response-case\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Response Case</h4>\n<p>Execute POST request for <code class=\"gatsby-code-text\">http://192.168.17.139:32507/manager/web/api/service/instances</code>, input parameters to publish the service instance.</p>\n<div class=\"gatsby-highlight\" data-language=\"jsxon\"><pre class=\"gatsby-code-jsxon\"><code class=\"gatsby-code-jsxon\">{\n    //The type of datasource: files workspace\n    &quot;dataSource&quot;: &quot;workspace&quot;,\n    //The type of service: REST-Map Service\n    &quot;serviceTypes&quot;:[\n        &quot;map-rest&quot;\n    ],\n    //The type of node：general node\n    &quot;nodeType&quot;: &quot;gisapplication&quot;,\n    &quot;nodeNames&quot;:[\n        &quot;Node1&quot;\n    ],\n    &quot;isCreateNode&quot;: true,\n    &quot;serviceXml&quot;: &quot;&quot;,\n    //The path of datasource: /data/China400.smwu\n    &quot;settings&quot;:\n    {\n        &quot;workspacePath&quot;: &quot;/data/China400.smwu&quot;,\n        &quot;mapEditable&quot;: &quot;&quot;\n    }\n}</code></pre></div>\n<p>The returned response in json format:</p>\n<div class=\"gatsby-highlight\" data-language=\"jsxon\"><pre class=\"gatsby-code-jsxon\"><code class=\"gatsby-code-jsxon\">{\n    &quot;isSucceed&quot;: true,\n    &quot;msg&quot;: &quot;&quot;,\n    &quot;serviceInfos&quot;: [\n        {\n            &quot;componentName&quot;: &quot;map-China400-astczjug0f&quot;,\n            &quot;interfaceName&quot;: &quot;rest&quot;,\n            &quot;alias&quot;: &quot;map-China400-astczjug0f-rest&quot;,\n            &quot;createTime&quot;: 1607676383491\n        }\n    ]\n}</code></pre></div>","frontmatter":{"title":"GIS Cloud Suite","next":null,"prev":null},"fields":{"path":"content/microservices/instancecreate.en.md","slug":"/en/microservices/instancecreate/","langKey":"en"}}},"pageContext":{"slug":"/en/microservices/instancecreate/"}}}