doc-exports/docs/mrs/api-ref/mrs_02_1094.html
Yang, Tong bd2b57f749 MRS API 2.0.38.SP20 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-11-16 15:06:08 +00:00

172 lines
15 KiB
HTML

<a name="mrs_02_1094"></a><a name="mrs_02_1094"></a>
<h1 class="topictitle1">Starting a Service</h1>
<div id="body8662426"><div class="section" id="mrs_02_1094__en-us_topic_0125376226_section165916208335"><h4 class="sectiontitle">Function </h4><p class="MsoNormal" id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p36809868">This API is used to start a specified service.</p>
</div>
<div class="section" id="mrs_02_1094__en-us_topic_0125376226_s7145b3e17e3d4733be11840a3d8ad534"><h4 class="sectiontitle">URI</h4><ul id="mrs_02_1094__en-us_topic_0125376226_ul1760404433317"><li id="mrs_02_1094__en-us_topic_0125376226_li66041944183319">Format</li></ul>
<p class="MsoNormal" id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p17685802">POST /web/v1/maintain/cluster/{cluster_id}/service/{service_name}/start</p>
<ul id="mrs_02_1094__en-us_topic_0125376226_ul8223981342"><li class="TableDescription" id="mrs_02_1094__en-us_topic_0125376226_li172231388343">URI parameter description</li></ul>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_table23263818" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row55214998"><th align="left" class="cellrowborder" valign="top" width="25.46%" id="mcps1.3.2.5.1.4.1.1"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p43229817"><strong id="mrs_02_1094__b162774213314533_1">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.46%" id="mcps1.3.2.5.1.4.1.2"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p11954326">Mandatory or Not</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.08%" id="mcps1.3.2.5.1.4.1.3"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p24370652"><strong id="mrs_02_1094__b842352706134712">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row27865835"><td class="cellrowborder" valign="top" width="25.46%" headers="mcps1.3.2.5.1.4.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p42540195">service_name</p>
</td>
<td class="cellrowborder" valign="top" width="25.46%" headers="mcps1.3.2.5.1.4.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p23203755">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.08%" headers="mcps1.3.2.5.1.4.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p63261583">Name of the service to be started</p>
</td>
</tr>
<tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row32483342"><td class="cellrowborder" valign="top" width="25.46%" headers="mcps1.3.2.5.1.4.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p13905044">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.46%" headers="mcps1.3.2.5.1.4.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p52566750">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.08%" headers="mcps1.3.2.5.1.4.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p30624083">Cluster ID that is displayed on MRS Manager. The default cluster ID is <strong id="mrs_02_1094__b842352706152828">1</strong>, because MRS Manager supports management of only one cluster currently.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_1094__en-us_topic_0125376226_sa389edb5feaa418d84261d04ea938f19"><h4 class="sectiontitle">Request</h4><ul id="mrs_02_1094__en-us_topic_0125376226_ul196488101351"><li id="mrs_02_1094__en-us_topic_0125376226_li106481010173516">Example:<pre class="screen" id="mrs_02_1094__en-us_topic_0125376226_screen198033817355">POST /web/v1/maintain/cluster/{cluster_id}/service/{service_name}/start HTTP/1.1
Host: example.com
Content-Type: application/json
Accept:application/json
{
"user_password": "string",
"only_self": true
}</pre>
</li><li class="TableDescription" id="mrs_02_1094__en-us_topic_0125376226_li158002463351">Parameter description</li></ul>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_table18102480" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter description</caption><thead align="left"><tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row37653629"><th align="left" class="cellrowborder" valign="top" width="25.252525252525253%" id="mcps1.3.3.3.2.4.1.1"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p30045122"><strong id="mrs_02_1094__b1549089900">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.181818181818183%" id="mcps1.3.3.3.2.4.1.2"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p17735803">Mandatory or Not</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.565656565656575%" id="mcps1.3.3.3.2.4.1.3"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p31668621"><strong id="mrs_02_1094__b1222691650">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row15021476"><td class="cellrowborder" valign="top" width="25.252525252525253%" headers="mcps1.3.3.3.2.4.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p8780064">user_password</p>
</td>
<td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.3.3.2.4.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p40096617">No</p>
</td>
<td class="cellrowborder" valign="top" width="56.565656565656575%" headers="mcps1.3.3.3.2.4.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p6856233">Password of the login user. This parameter is used for secondary authentication. You do not need to enter a specific value when starting the service. The parameter value can be null.</p>
</td>
</tr>
<tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row61706098"><td class="cellrowborder" valign="top" width="25.252525252525253%" headers="mcps1.3.3.3.2.4.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p32138059">only_self</p>
</td>
<td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.3.3.2.4.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p53045956">No</p>
</td>
<td class="cellrowborder" valign="top" width="56.565656565656575%" headers="mcps1.3.3.3.2.4.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p8012684">Whether to operate only the specified service</p>
<p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p5005297"><strong id="mrs_02_1094__b842352706204759">false</strong>: The services on which the service depends are also started.</p>
<p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p45047680"><strong id="mrs_02_1094__b842352706204833">true</strong>: Only the specified service is started.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_1094__en-us_topic_0125376226_s8985f9ec35a042b4ac6d4ea7b402f9eb"><h4 class="sectiontitle">Response</h4><ul id="mrs_02_1094__en-us_topic_0125376226_ul92529232451"><li id="mrs_02_1094__en-us_topic_0125376226_li8252112384518">Example:<pre class="screen" id="mrs_02_1094__en-us_topic_0125376226_screen110204984515">HTTP/1.1 200 OK
Data:Wed,02 May 2018 10:10:01 GMT
Server: example-server
Content-Type: application/json
{
"id": 0,
"state": "COMPLETE",
"error_code": 0,
"error_description": "string",
"total_progress": 0
}</pre>
</li></ul>
<ul id="mrs_02_1094__en-us_topic_0125376226_ul1756105514459"><li class="TableDescription" id="mrs_02_1094__en-us_topic_0125376226_li056105519455">Response parameter description</li></ul>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_table46926526" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row60217622"><th align="left" class="cellrowborder" valign="top" width="20.292029202920293%" id="mcps1.3.4.4.1.5.1.1"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p45789215"><strong id="mrs_02_1094__b446734769">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.292029202920293%" id="mcps1.3.4.4.1.5.1.2"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p17938969">Mandatory or Not</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.292029202920293%" id="mcps1.3.4.4.1.5.1.3"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p43770412"><strong id="mrs_02_1094__b136973423914510">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.123912391239124%" id="mcps1.3.4.4.1.5.1.4"><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p50100742"><strong id="mrs_02_1094__b247659283">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row31628298"><td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p11755375">id</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p12661341">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p18935675">LONG</p>
</td>
<td class="cellrowborder" valign="top" width="39.123912391239124%" headers="mcps1.3.4.4.1.5.1.4 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p18616839">Asynchronous task ID (meaningless in other scenarios). The default value is <strong id="mrs_02_1094__b842352706191850">-1</strong>.</p>
</td>
</tr>
<tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row33333830"><td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p15685685">state</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p62580961">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p35893041">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="39.123912391239124%" headers="mcps1.3.4.4.1.5.1.4 "><p id="mrs_02_1094__en-us_topic_0125376226_p16759122410200">Cluster status</p>
<ul id="mrs_02_1094__en-us_topic_0125376226_ul137411037122018"><li id="mrs_02_1094__en-us_topic_0125376226_li18741123716201"><strong id="mrs_02_1094__b145902367127">FAILED</strong>: The command failed to be executed. </li><li id="mrs_02_1094__en-us_topic_0125376226_li1526744082017"><strong id="mrs_02_1094__b169160374126">COMPLETE</strong>: The command is executed successfully.</li><li id="mrs_02_1094__en-us_topic_0125376226_li184631743172011">IN_PROGRESS: The command is being executed.</li></ul>
</td>
</tr>
<tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row17570434"><td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p13919031">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p53699741">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p54711771">INTEGER</p>
</td>
<td class="cellrowborder" valign="top" width="39.123912391239124%" headers="mcps1.3.4.4.1.5.1.4 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p22637498">Error code returned</p>
</td>
</tr>
<tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row2410891"><td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p61064511">error_description</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p47278359">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p4341884">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="39.123912391239124%" headers="mcps1.3.4.4.1.5.1.4 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p51271045">Error code description</p>
</td>
</tr>
<tr id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_row58786223"><td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p64063627">total_progress</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p21771295">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.292029202920293%" headers="mcps1.3.4.4.1.5.1.3 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p18644500">FLOAT</p>
</td>
<td class="cellrowborder" valign="top" width="39.123912391239124%" headers="mcps1.3.4.4.1.5.1.4 "><p id="mrs_02_1094__en-us_topic_0125376226_en-us_topic_0110839918_p29689414">Total progress</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_1094__en-us_topic_0125376226_section2092982712508"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_1094__en-us_topic_0125376226_table2979011121511" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_02_1094__en-us_topic_0125376226_row3981161161515"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.5.2.1.3.1.1"><p id="mrs_02_1094__en-us_topic_0125376226_p398115116158">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="83%" id="mcps1.3.5.2.1.3.1.2"><p id="mrs_02_1094__en-us_topic_0125376226_p1798121191515">Description </p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_1094__en-us_topic_0125376226_row69813112155"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.5.2.1.3.1.1 "><p id="mrs_02_1094__en-us_topic_0125376226_p15667142018546">200</p>
</td>
<td class="cellrowborder" valign="top" width="83%" headers="mcps1.3.5.2.1.3.1.2 "><p id="mrs_02_1094__en-us_topic_0125376226_p23378286542">The operation is successful.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="mrs_02_1094__en-us_topic_0125376226_p385511715205">For details about error status codes, see <a href="mrs_02_0015.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_02_1086.html">MRS Manager Web APIs</a></div>
</div>
</div>