forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
114 lines
11 KiB
HTML
114 lines
11 KiB
HTML
<a name="apig-en-api-180328009"></a><a name="apig-en-api-180328009"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining Required Information</h1>
|
|
<div id="body1521440716579"><p id="apig-en-api-180328009__p863894012410">Obtain the required information before calling APIs.</p>
|
|
<div class="section" id="apig-en-api-180328009__section153941628222"><h4 class="sectiontitle">Required Information</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="apig-en-api-180328009__table89201225436" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Required information</caption><thead align="left"><tr id="apig-en-api-180328009__row17922922184315"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.2.2.4.1.1"><p id="apig-en-api-180328009__p1692232219431">Item</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.2.2.4.1.2"><p id="apig-en-api-180328009__p15116194120210">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62%" id="mcps1.3.2.2.2.4.1.3"><p id="apig-en-api-180328009__p5922822134311">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="apig-en-api-180328009__row1292252210435"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p9922152264312">Service name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p121167413214">serviceName</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p19922132218438">Service name, for example, <strong id="apig-en-api-180328009__b16839133193612">iam</strong>, <strong id="apig-en-api-180328009__b33031135183616">vpc</strong>, and <strong id="apig-en-api-180328009__b2747113618368">ecs</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row79220222435"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p6922192216432">Region/Endpoint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p811619418219">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p1219416014298">Region and endpoint.</p>
|
|
<p id="apig-en-api-180328009__p2922922134320">See <a href="https://docs.otc.t-systems.com/regions-and-endpoints/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row692212217436"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p1892232215434">Project ID</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p2116104114215">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p16215536292">Project ID, which is configured in the URI in most cases.</p>
|
|
<p id="apig-en-api-180328009__p0922132284311">For details about how to obtain the value of this parameter, see <a href="#apig-en-api-180328009__section8415105514222">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row2083017122504"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p3582122015507">username/password</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p191165411214">username/password</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p158321512105018">Username and password, which are used to obtain a token in token authentication mode.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row2236194665011"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p092222213431">AK/SK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p14116841727">ak/sk</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p1323720466507">AK/SK pair.</p>
|
|
<p id="apig-en-api-180328009__p1485015558268">It is used in AK/SK authentication mode.</p>
|
|
<p id="apig-en-api-180328009__p20544161010295">For details about how to obtain the value of this parameter, see <a href="apig-en-api-180328005.html">Generating an AK and SK</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row125827205504"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p179221622194314">uri</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p1311812410218">uri</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p1058292035010">Request path and parameters.</p>
|
|
<p id="apig-en-api-180328009__p481011367419">Obtain the URI according to the API reference guide of each service.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row119221922114319"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p18832712115014">Domain Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p9118541822">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p149171051265">Account name, which is used to obtain a token in token authentication mode.</p>
|
|
<p id="apig-en-api-180328009__p1080118162308">For details about how to obtain the value of this parameter, see <a href="#apig-en-api-180328009__section208398123112">Obtaining the Domain Name and Domain ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row18610267583"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p969671312589">Domain ID</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p06111763587">X-Domain-Id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p132148459581">Account ID, which is used to:</p>
|
|
<ul id="apig-en-api-180328009__ul9215134516589"><li id="apig-en-api-180328009__li1216124575814">Obtain a token in token authentication mode.</li><li id="apig-en-api-180328009__li2217124525810">Access global services, such as IAM, DNS, and CDN, in AK/SK authentication mode. You must specify a domain ID in the header.</li></ul>
|
|
<p id="apig-en-api-180328009__p12192459587">For details about how to obtain the value of this parameter, see <a href="#apig-en-api-180328009__section208398123112">Obtaining the Domain Name and Domain ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="apig-en-api-180328009__row159222226431"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.1 "><p id="apig-en-api-180328009__p1923614625019">Sub-project ID</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.2.2.4.1.2 "><p id="apig-en-api-180328009__p61467418378">X-Project-Id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.2.2.2.4.1.3 "><p id="apig-en-api-180328009__p14922112220437">Sub-project ID, which is used in multi-project scenarios.</p>
|
|
<p id="apig-en-api-180328009__p438713014304">For details about how to obtain the value of this parameter, see <a href="#apig-en-api-180328009__section8415105514222">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="apig-en-api-180328009__section8415105514222"><a name="apig-en-api-180328009__section8415105514222"></a><a name="section8415105514222"></a><h4 class="sectiontitle">Obtaining a Project ID</h4><p id="apig-en-api-180328009__p8112855194115">A project ID needs to be specified in the URIs of some APIs. Therefore, you need to obtain the project ID before calling APIs. The following procedure describes how to obtain a project ID:</p>
|
|
<ol id="apig-en-api-180328009__ol8715914194127"><li id="apig-en-api-180328009__li50056756194127">Log in to the management console.</li><li id="apig-en-api-180328009__li2804809915217">Click the username and choose <strong id="apig-en-api-180328009__b2041183210509">My Credential</strong> from the drop-down list.<p id="apig-en-api-180328009__p136772519449">On the <strong id="apig-en-api-180328009__b842352706173720">My Credential</strong> page, view project IDs in the project list.</p>
|
|
<div class="fignone" id="apig-en-api-180328009__fig39324824103512"><span class="figcap"><b>Figure 1 </b>Viewing project IDs</span><br><span><img id="apig-en-api-180328009__image538470016132" src="en-us_image_0132451568.jpg" title="Click to enlarge" class="imgResize"></span></div>
|
|
<p id="apig-en-api-180328009__p161401458143817">In multi-project scenarios, expand the region, and obtain your sub-project ID from the <strong id="apig-en-api-180328009__b1209121375116">Project ID</strong> column.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="apig-en-api-180328009__section208398123112"><a name="apig-en-api-180328009__section208398123112"></a><a name="section208398123112"></a><h4 class="sectiontitle">Obtaining the Domain Name and Domain ID</h4><p id="apig-en-api-180328009__p6318127133117">When you call APIs, your domain name and domain ID are required in some URLs. Obtain your domain name and domain ID on the console by performing the following steps:</p>
|
|
<ol id="apig-en-api-180328009__ol1785371333311"><li id="apig-en-api-180328009__li285401317338">Log in to the management console.</li></ol><ol start="2" id="apig-en-api-180328009__ol20610950154519"><li id="apig-en-api-180328009__li66103506450">Click the username and choose <strong id="apig-en-api-180328009__b9575194055617">My Credential</strong> from the drop-down list.<p id="apig-en-api-180328009__p1361475084510">On the <strong id="apig-en-api-180328009__b37358146449">My Credential</strong> page, view the domain name and domain ID.</p>
|
|
<div class="fignone" id="apig-en-api-180328009__fig261615018450"><span class="figcap"><b>Figure 2 </b>Viewing the domain name and domain ID</span><br><span><img id="apig-en-api-180328009__image14231047165519" src="en-us_image_0132453772.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="apig-en-api-180925010.html">Calling APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |