doc-exports/docs/dli/api-ref/dli_02_0261.html
Su, Xiaomeng 57a0d535be dli_api_0910_version_api
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2023-10-16 22:01:57 +00:00

279 lines
19 KiB
HTML

<a name="dli_02_0261"></a><a name="dli_02_0261"></a>
<h1 class="topictitle1">Querying All Global Variables</h1>
<div id="body1586938061410"><div class="section" id="dli_02_0261__section123211931103215"><h4 class="sectiontitle">Function</h4><p id="dli_02_0261__p3953131716322">This API is used to query information about all global variables in the current project.</p>
</div>
<div class="section" id="dli_02_0261__section18631191318335"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0261__ul159552017143210"><li id="dli_02_0261__li0955191713321">URI format<p id="dli_02_0261__p12955101753214"><a name="dli_02_0261__li0955191713321"></a><a name="li0955191713321"></a>GET /v1.0/{project_id}/variables</p>
</li><li id="dli_02_0261__li12955917103212">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0261__table85011110367" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="dli_02_0261__row1151151112363"><th align="left" class="cellrowborder" valign="top" width="15.82%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0261__p713722216362">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.320000000000002%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0261__p1613722243610">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.18%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0261__p182773344410">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60.68%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0261__p41379229369">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0261__row19521111133619"><td class="cellrowborder" valign="top" width="15.82%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0261__p213712219366">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0261__p1013713229369">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="10.18%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0261__p18286335444">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.68%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0261__p1768719515356">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0261__table199792346283" frame="border" border="1" rules="all"><caption><b>Table 2 </b>query parameter description</caption><thead align="left"><tr id="dli_02_0261__row0980434122818"><th align="left" class="cellrowborder" valign="top" width="19.64%" id="mcps1.3.2.2.2.2.2.5.1.1"><p id="dli_02_0261__p675604784218">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.510000000000002%" id="mcps1.3.2.2.2.2.2.5.1.2"><p id="dli_02_0261__p5148199138">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.99%" id="mcps1.3.2.2.2.2.2.5.1.3"><p id="dli_02_0261__p42459531123">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.86000000000001%" id="mcps1.3.2.2.2.2.2.5.1.4"><p id="dli_02_0261__p1375244714425">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0261__row17395182314134"><td class="cellrowborder" valign="top" width="19.64%" headers="mcps1.3.2.2.2.2.2.5.1.1 "><p id="dli_02_0261__p3429938201311">limit</p>
</td>
<td class="cellrowborder" valign="top" width="14.510000000000002%" headers="mcps1.3.2.2.2.2.2.5.1.2 "><p id="dli_02_0261__p742983831319">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.99%" headers="mcps1.3.2.2.2.2.2.5.1.3 "><p id="dli_02_0261__p134292387138">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50.86000000000001%" headers="mcps1.3.2.2.2.2.2.5.1.4 "><p id="dli_02_0261__p9584183382518">Number of returned records displayed on each page. The default value is <span class="parmvalue" id="dli_02_0261__parmvalue63669572257"><b>100</b></span>.</p>
</td>
</tr>
<tr id="dli_02_0261__row206981425183517"><td class="cellrowborder" valign="top" width="19.64%" headers="mcps1.3.2.2.2.2.2.5.1.1 "><p id="dli_02_0261__p1081713718354">offset</p>
</td>
<td class="cellrowborder" valign="top" width="14.510000000000002%" headers="mcps1.3.2.2.2.2.2.5.1.2 "><p id="dli_02_0261__p9817193719353">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.99%" headers="mcps1.3.2.2.2.2.2.5.1.3 "><p id="dli_02_0261__p6817183716356">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50.86000000000001%" headers="mcps1.3.2.2.2.2.2.5.1.4 "><p id="dli_02_0261__p181753715354">Offset. The default value is <span class="parmvalue" id="dli_02_0261__parmvalue7966105015255"><b>0</b></span>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dli_02_0261__section1491182314336"><h4 class="sectiontitle">Request</h4><p id="dli_02_0261__p235122174914">None</p>
</div>
<div class="section" id="dli_02_0261__section1370125017332"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0261__table18782151885610" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0261__row1978361835618"><th align="left" class="cellrowborder" valign="top" width="14.02%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0261__p19783181875611">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.89%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0261__p127831918175612">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.35%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0261__p15783218105613">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.74%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0261__p4783121812564">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0261__row1574818467566"><td class="cellrowborder" valign="top" width="14.02%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0261__p13814297574">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="10.89%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0261__p198156916571">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.35%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0261__p17815993576">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="56.74%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0261__p19815292577">Whether the request is successfully executed. Value <strong id="dli_02_0261__b1590617112377">true</strong> indicates that the request is successfully executed.</p>
</td>
</tr>
<tr id="dli_02_0261__row1543143525614"><td class="cellrowborder" valign="top" width="14.02%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0261__p7816593573">message</p>
</td>
<td class="cellrowborder" valign="top" width="10.89%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0261__p1881769195718">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.35%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0261__p1781719195716">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.74%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0261__p168171894576">System prompt. If execution succeeds, the parameter setting may be left blank.</p>
</td>
</tr>
<tr id="dli_02_0261__row88487521011"><td class="cellrowborder" valign="top" width="14.02%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0261__p85761258820">count</p>
</td>
<td class="cellrowborder" valign="top" width="10.89%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0261__p1057610581928">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.35%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0261__p3953554539">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="56.74%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0261__p15761458828">Number of global variables.</p>
</td>
</tr>
<tr id="dli_02_0261__row5150135942618"><td class="cellrowborder" valign="top" width="14.02%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0261__p6151125922618">global_vars</p>
</td>
<td class="cellrowborder" valign="top" width="10.89%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0261__p1815105917269">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.35%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0261__p1115120591268">Array of Objects</p>
</td>
<td class="cellrowborder" valign="top" width="56.74%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0261__p1315214596269">Global variable information. For details, see <a href="#dli_02_0261__table15129182752011">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dli_02_0261__table15129182752011"></a><a name="table15129182752011"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0261__table15129182752011" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="dli_02_0261__b193884503818">global_vars</strong> parameters</caption><thead align="left"><tr id="dli_02_0261__row81307271206"><th align="left" class="cellrowborder" valign="top" width="14.940000000000001%" id="mcps1.3.4.3.2.5.1.1"><p id="dli_02_0261__p1113118274208">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.01%" id="mcps1.3.4.3.2.5.1.2"><p id="dli_02_0261__p111314272206">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.95%" id="mcps1.3.4.3.2.5.1.3"><p id="dli_02_0261__p161314276203">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60.099999999999994%" id="mcps1.3.4.3.2.5.1.4"><p id="dli_02_0261__p313112272203">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0261__row13133122713203"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p313302792010">id</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p17133142762018">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p1713318278203">Long</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p2013352732010">Global variable ID.</p>
</td>
</tr>
<tr id="dli_02_0261__row141338272203"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p61332027132012">var_name</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p913432711205">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p1513472792020">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p813482711209">Global variable name.</p>
</td>
</tr>
<tr id="dli_02_0261__row17134182719200"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p8134122742016">var_value</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p813414277206">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p3134142742013">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p1413419270208">Global variable value.</p>
</td>
</tr>
<tr id="dli_02_0261__row21341727102018"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p19134192716205">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p1134102718206">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p3134112792015">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p8134827142011">Project ID.</p>
</td>
</tr>
<tr id="dli_02_0261__row71359271200"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p413518277205">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p11135112782015">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p21383273207">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p13138152712016">User ID.</p>
</td>
</tr>
<tr id="dli_02_0261__row14147617125419"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p17147141711543">user_name</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p10147111765413">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p15147917195419">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p1714721714548">Username</p>
</td>
</tr>
<tr id="dli_02_0261__row1213892792015"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p4138927192017">is_sensitive</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p16139102752010">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p10139427172018">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p191391827192016">Whether to set a variable as a sensitive variable.</p>
</td>
</tr>
<tr id="dli_02_0261__row525842855411"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p4258182817549">create_time</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p20258172820545">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p16258428175412">Long</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p11258628135415">Creation time</p>
</td>
</tr>
<tr id="dli_02_0261__row12193103515548"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0261__p1919333511545">update_time</p>
</td>
<td class="cellrowborder" valign="top" width="10.01%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0261__p419317351547">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.95%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0261__p1319319353546">Long</p>
</td>
<td class="cellrowborder" valign="top" width="60.099999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0261__p171931735105413">Update time</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0261__section14769144211244"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0261__p4250451152420">None</p>
</div>
<div class="section" id="dli_02_0261__section8528115415245"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0261__screen6521101354117">{
"is_success": true,
"message": "string",
"count": 0,
"global_vars": [
{
"id": 0,
"var_name": "string",
"var_value": "string",
"project_id": "string",
"user_id": "string"
}
]
}</pre>
</div>
<div class="section" id="dli_02_0261__section2013612106511"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0261__table181259166119" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Status codes</caption><thead align="left"><tr id="dli_02_0261__row21258169115"><th align="left" class="cellrowborder" valign="top" width="19.29%" id="mcps1.3.7.2.2.3.1.1"><p id="dli_02_0261__p13125716519">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="80.71000000000001%" id="mcps1.3.7.2.2.3.1.2"><p id="dli_02_0261__p612514169110">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0261__row412517161919"><td class="cellrowborder" valign="top" width="19.29%" headers="mcps1.3.7.2.2.3.1.1 "><p id="dli_02_0261__p17974141753213">200</p>
</td>
<td class="cellrowborder" valign="top" width="80.71000000000001%" headers="mcps1.3.7.2.2.3.1.2 "><p id="dli_02_0261__p17974121753214">All variables are queried successfully.</p>
</td>
</tr>
<tr id="dli_02_0261__row9126716712"><td class="cellrowborder" valign="top" width="19.29%" headers="mcps1.3.7.2.2.3.1.1 "><p id="dli_02_0261__p1974101715322">400</p>
</td>
<td class="cellrowborder" valign="top" width="80.71000000000001%" headers="mcps1.3.7.2.2.3.1.2 "><p id="dli_02_0261__p14974181733212">The input parameter is invalid.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0261__section13596141025715"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0261__dli_02_0225_p420584425712">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Codes</a>.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0261__dli_02_0225_table847819307387" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Error codes</caption><thead align="left"><tr id="dli_02_0261__dli_02_0225_row2479163016383"><th align="left" class="cellrowborder" valign="top" width="15.870000000000001%" id="mcps1.3.8.3.2.3.1.1"><p id="dli_02_0261__dli_02_0225_p114796309389">Error Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="84.13000000000001%" id="mcps1.3.8.3.2.3.1.2"><p id="dli_02_0261__dli_02_0225_p1647973053817">Error Message</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0261__dli_02_0225_row1047920308387"><td class="cellrowborder" valign="top" width="15.870000000000001%" headers="mcps1.3.8.3.2.3.1.1 "><p id="dli_02_0261__p5812152503210">DLI.0001</p>
</td>
<td class="cellrowborder" valign="top" width="84.13000000000001%" headers="mcps1.3.8.3.2.3.1.2 "><p id="dli_02_0261__p78114251329">Parameter check errors occur.</p>
</td>
</tr>
<tr id="dli_02_0261__row12989120113217"><td class="cellrowborder" valign="top" width="15.870000000000001%" headers="mcps1.3.8.3.2.3.1.1 "><p id="dli_02_0261__p998917018325">DLI.0999</p>
</td>
<td class="cellrowborder" valign="top" width="84.13000000000001%" headers="mcps1.3.8.3.2.3.1.2 "><p id="dli_02_0261__p899030163219">Server-side errors occur.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0257.html">Global Variable-related APIs</a></div>
</div>
</div>