forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
256 lines
17 KiB
HTML
256 lines
17 KiB
HTML
<a name="mrs_02_0024"></a><a name="mrs_02_0024"></a>
|
|
|
|
<h1 class="topictitle1">Querying the Data Source List</h1>
|
|
<div id="body1484116919792"><div class="section" id="mrs_02_0024__section11410068144834"><h4 class="sectiontitle">Function</h4><p id="mrs_02_0024__p30367694144836">This API is used to query the data source list. This API is compatible with Sahara.</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0024__section4721807314497"><h4 class="sectiontitle">URI</h4><ul id="mrs_02_0024__u749b0e1d16034ea99b9d31909ce7ee80"><li id="mrs_02_0024__li82582474812">Format<p id="mrs_02_0024__p435614245485"><a name="mrs_02_0024__li82582474812"></a><a name="li82582474812"></a>GET /v1.1/{project_id}/data-sources</p>
|
|
</li><li id="mrs_02_0024__li831194172516">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0024__table49499141194754" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter description</caption><thead align="left"><tr id="mrs_02_0024__row33700024194754"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="mrs_02_0024__p16571835194812">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="mrs_02_0024__p141410194812">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="mrs_02_0024__p11454278194812">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0024__row6505449415356"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0024__p3492262515356">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0024__p1016041415356">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0024__p1768719515356">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row20659256153330"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0024__p10159747154837">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0024__p44704178154837">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0024__p49662373154837">Maximum number of objects in response data</p>
|
|
<p id="mrs_02_0024__p39045553104130">Value range: 1 to 1073741822</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row6317415154849"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0024__p41948639154849">marker</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0024__p42396583154849">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0024__p3859954494718">Data source ID</p>
|
|
<p id="mrs_02_0024__p11571175154849">Query the data source list, and select one data source ID as the marker. The ID is the last element on the list that will not be returned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row25723845154843"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0024__p3256680154843">sort_by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0024__p62464499154843">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0024__p26459663154843">Sort field</p>
|
|
<p id="mrs_02_0024__p1746233322911">A hyphen (-) before the sort field indicates to sort in descending order. Example:</p>
|
|
<ul id="mrs_02_0024__ul5167941115195"><li id="mrs_02_0024__li4752566615198"><strong id="mrs_02_0024__b6174964693835">sort_by=name</strong> indicates to sort by name in ascending order.</li><li id="mrs_02_0024__li3034789115195"><strong id="mrs_02_0024__b612896093841">sort_by=-name</strong> indicates to sort by name in descending order.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_02_0024__section31697334144924"><h4 class="sectiontitle">Request</h4><p id="mrs_02_0024__p17626201483812"><strong id="mrs_02_0024__b139822112354">Request parameters</strong></p>
|
|
<p id="mrs_02_0024__p8855143717407">None.</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0024__section10069032144933"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0024__table51257841151049" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter description</caption><thead align="left"><tr id="mrs_02_0024__row8480851151049"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.1"><p id="mrs_02_0024__p15860319151049">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.2"><p id="mrs_02_0024__p40813771151049">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.2.4.1.3"><p id="mrs_02_0024__p17581180151049">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0024__row6100194103515"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0024__p24353731103515">markers</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0024__p65739139103515">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0024__p23270066103515">Marker object For more parameter description, see <a href="#mrs_02_0024__table35904709104244">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row12577217103942"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0024__p12121637103942">data_sources</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0024__p6059195103942">Array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0024__p21032764103942">Data source list For more parameter description, see <a href="#mrs_02_0024__table53055087104252">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0024__table35904709104244"></a><a name="table35904709104244"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0024__table35904709104244" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="mrs_02_0024__b1532063113301">markers</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0024__row49938240104244"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="mrs_02_0024__p18465671104244">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="mrs_02_0024__p21768128104244">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="mrs_02_0024__p18387972104244">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0024__row13030764104244"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0024__p63118498104319">prev</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0024__p43381604104319">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0024__p39594016104319">Marker on the previous page</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row58460908104244"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0024__p46558357104319">next</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0024__p66061904104319">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0024__p53737691104319">Marker on the next page</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0024__table53055087104252"></a><a name="table53055087104252"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0024__table53055087104252" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="mrs_02_0024__b133401654184416">data_sources</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0024__row35892073104252"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="mrs_02_0024__p21576778104252">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="mrs_02_0024__p32652035104252">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="mrs_02_0024__p27569194104252">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0024__row18726201104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p40427346104252">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p29590281104252">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p48002551104252">Data source name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row29369779104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p30141923104252">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p58448085104252">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p36674406104252">Data source type</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row61634201104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p26314410104252">url</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p44852170104252">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p9147177104252">Data source URL</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row15215732104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p24514817104252">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p48878563104252">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p66849545104252">Data source description</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row64774998104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p12283463104252">created_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p61169696104252">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p55798359104252">Data source creation time</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row33701760152359"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p45488048152359">updated_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p13966373152359">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p57534394152359">Data source update time</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row32423190104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p9032743104252">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p6703306104252">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p6096941104252">Data source ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row54872471104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p15485137104252">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p62274483104252">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p13745886363">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row32506112104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p15749438104252">is_public</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p51522162104252">Bool</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p12545593104252">Whether the data source is public</p>
|
|
<ul id="mrs_02_0024__ul35290564102533"><li id="mrs_02_0024__li49179622102533">true</li><li id="mrs_02_0024__li39963415102533">false</li></ul>
|
|
<p id="mrs_02_0024__p24126416102533">The current version does not support this function.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0024__row45801476104252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0024__p18932079104252">is_protected</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0024__p61973162104252">Bool</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0024__p53770186104252">Whether the data source is protected</p>
|
|
<ul id="mrs_02_0024__ul46267294153233"><li id="mrs_02_0024__li13752465153233">true</li><li id="mrs_02_0024__li56663328153233">false</li></ul>
|
|
<p id="mrs_02_0024__p40207906153233">The current version does not support this function.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_02_0024__section13287161117450"><h4 class="sectiontitle">Example</h4><ul id="mrs_02_0024__ul76961053453"><li id="mrs_02_0024__li1269611155138">Example request<pre class="screen" id="mrs_02_0024__screen423363911451">GET /v1.1/{project_id}/data-sources?sort_by=name&limit=2&marker=81a2d48b-029a-4160-830b-2d0ac51fa3ba</pre>
|
|
</li></ul>
|
|
</div>
|
|
<ul id="mrs_02_0024__ul16153151174520"><li id="mrs_02_0024__li42455269155220">Example response<pre class="screen" id="mrs_02_0024__screen57077310103421">{
|
|
"markers": {
|
|
"prev": "948b92e5-8213-4f5d-975a-435a67c6b93d",
|
|
"next": null
|
|
},
|
|
"data_sources": [
|
|
{
|
|
"name": "my-data-source-update",
|
|
"type": "hdfs",
|
|
"url": "/simple/mapreduce/input",
|
|
"description": "this is the data source template",
|
|
"created_at": "2017-06-22T08:28:57",
|
|
"updated_at": "2017-06-22T08:30:08",
|
|
"id": "e275a927-fe72-4b8b-a634-e47a11dca181",
|
|
"tenant_id": "5a3314075bfa49b9ae360f4ecd333695",
|
|
"is_public": false,
|
|
"is_protected": false
|
|
},
|
|
{
|
|
"name": "my-datasource",
|
|
"type": "hdfs",
|
|
"url": "/simple/mapreduce/input",
|
|
"description": "this is the data source template",
|
|
"created_at": "2017-06-22T08:22:06",
|
|
"updated_at": null,
|
|
"id": "e68164d5-5897-41a7-a550-5de635fffe20",
|
|
"tenant_id": "5a3314075bfa49b9ae360f4ecd333695",
|
|
"is_public": false,
|
|
"is_protected": false
|
|
}
|
|
]
|
|
}</pre>
|
|
</li></ul>
|
|
<div class="section" id="mrs_02_0024__section13299747144948"><h4 class="sectiontitle">Status Code</h4><p id="mrs_02_0024__p5547365016031"><a href="#mrs_02_0024__table1584477916050">Table 5</a> describes the status code of this API.</p>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0024__table1584477916050"></a><a name="table1584477916050"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0024__table1584477916050" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Status code</caption><thead align="left"><tr id="mrs_02_0024__row1339492016050"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.3.1.1"><p id="mrs_02_0024__p3411176516050">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.7.3.2.3.1.2"><p id="mrs_02_0024__p1158961516050">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0024__row3719767816050"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="mrs_02_0024__p6022194016050">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="mrs_02_0024__p4613894216050">The data source list is queried successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_02_0024__p182240596509">For the description 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_0021.html">Data Source APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|