forked from docs/doc-exports
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com> Co-committed-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com>
170 lines
11 KiB
HTML
170 lines
11 KiB
HTML
<a name="dis_02_0403"></a><a name="dis_02_0403"></a>
|
|
|
|
<h1 class="topictitle1">Submitting Checkpoints</h1>
|
|
<div id="body294072716531"><div class="section" id="dis_02_0403__section49402278538"><h4 class="sectiontitle">Function</h4><p id="dis_02_0403__p894111272535">This API is used to submit checkpoints.</p>
|
|
</div>
|
|
<div class="section" id="dis_02_0403__section1794322725316"><h4 class="sectiontitle">URI</h4><p id="dis_02_0403__p8944142720535">POST /v2/{project_id}/checkpoints</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dis_02_0403__table1894582725313" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="dis_02_0403__row15944122715536"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="dis_02_0403__p1094532755314">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="dis_02_0403__p894612715538">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="dis_02_0403__p49471827145319">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="dis_02_0403__p1094762713539">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dis_02_0403__row094413279535"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="dis_02_0403__p1594812713539">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="dis_02_0403__p209491527205314">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="dis_02_0403__p5949327125320">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="dis_02_0403__p79505271531">Project ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dis_02_0403__section1950142745313"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dis_02_0403__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="dis_02_0403__row995172714536"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="dis_02_0403__p59531727205319">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="dis_02_0403__p995472710531">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="dis_02_0403__p19954102713538">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="dis_02_0403__p9955112735314">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dis_02_0403__row1395119274534"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dis_02_0403__p595652712539">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dis_02_0403__p14956112714535">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dis_02_0403__p1395782715315">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dis_02_0403__p39570271531">User token</p>
|
|
<p id="dis_02_0403__p13958202775318">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="dis_02_0403__b149582277530">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dis_02_0403__request_CommitCheckpointReq" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="dis_02_0403__row139598271534"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="dis_02_0403__p13961102765318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="dis_02_0403__p896112785310">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="dis_02_0403__p16962527175317">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="dis_02_0403__p896222720538">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dis_02_0403__row109591127115317"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dis_02_0403__p8963132725319">app_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dis_02_0403__p1964027165310">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dis_02_0403__p1296482775318">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dis_02_0403__p896532775317">Name of the app, which is the unique identifier of a user data consumption program.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dis_02_0403__row5959132765315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dis_02_0403__p189651327115315">checkpoint_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dis_02_0403__p7966132755319">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dis_02_0403__p89661127115313">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dis_02_0403__p496718274534">Type of the checkpoint</p>
|
|
<ul id="dis_02_0403__ul3968182716535"><li id="dis_02_0403__li13968827175316"><strong id="dis_02_0403__b13969162715319">LAST_READ</strong>: Only sequence numbers are recorded in databases.</li></ul>
|
|
<p id="dis_02_0403__p139699279531">Enumeration values:</p>
|
|
<ul id="dis_02_0403__ul69691227185320"><li id="dis_02_0403__li5970227165311"><strong id="dis_02_0403__b1597092745317">LAST_READ</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dis_02_0403__row189599279537"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dis_02_0403__p159708271532">stream_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dis_02_0403__p1971527135315">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dis_02_0403__p14972202718531">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dis_02_0403__p139721027155319">Name of the stream.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dis_02_0403__row495913276533"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dis_02_0403__p18973152715319">partition_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dis_02_0403__p13973182718534">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dis_02_0403__p16974172795317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dis_02_0403__p1818894317816">Partition ID of the stream The value can be in either of the following formats:- shardId-0000000000- 0</p>
|
|
<p id="dis_02_0403__p139741427165313">For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002, respectively.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dis_02_0403__row09591627185311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dis_02_0403__p1597552716533">sequence_number</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dis_02_0403__p39751027145317">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dis_02_0403__p11976192705318">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dis_02_0403__p12977127155317">Sequence number to be submitted, which is used to record the consumption checkpoint of the stream. Ensure that the sequence number is within the valid range.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dis_02_0403__row10960427195319"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dis_02_0403__p1197712273533">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dis_02_0403__p59789276533">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dis_02_0403__p19795277531">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dis_02_0403__p2097916271530">Metadata information of the consumer application</p>
|
|
<p id="dis_02_0403__p11980202718531">The metadata information can contain a maximum of 1,000 characters.</p>
|
|
<p id="dis_02_0403__p3980122775315">Maximum: <strong id="dis_02_0403__b1298172712537">1000</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dis_02_0403__section7981527135310"><h4 class="sectiontitle">Response Parameters</h4><p id="dis_02_0403__p5982827155314">None</p>
|
|
</div>
|
|
<div class="section" id="dis_02_0403__section1998272755314"><h4 class="sectiontitle">Example Requests</h4><p id="dis_02_0403__p8983142717532">Submitting Checkpoints</p>
|
|
<pre class="screen" id="dis_02_0403__screen498452710535">POST https://{Endpoint}/v2/{project_id}/checkpoints
|
|
|
|
{
|
|
"stream_name" : "newstream",
|
|
"app_name" : "newapp",
|
|
"partition_id" : "0",
|
|
"sequence_number" : "2",
|
|
"checkpoint_type" : "LAST_READ"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dis_02_0403__section15989227185316"><h4 class="sectiontitle">Example Responses</h4><p id="dis_02_0403__p1399012274535">None</p>
|
|
</div>
|
|
<div class="section" id="dis_02_0403__section599142775312"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dis_02_0403__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="dis_02_0403__row3991527195315"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="dis_02_0403__p5992172717531">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="dis_02_0403__p599312271531">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dis_02_0403__row1699210271537"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="dis_02_0403__p1399411270536">201</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="dis_02_0403__p5994172765318">Normal response.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dis_02_0403__section6996112735314"><h4 class="sectiontitle">Error Codes</h4><p id="dis_02_0403__p20997102745311">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000002.html">Checkpoint Management</a></div>
|
|
</div>
|
|
</div>
|
|
|