Files
doc-exports/docs/vpn/api-ref/vpn_api_0011.html
Hongwei, King Wang 708fdb2d21 vpn_api_20250707
Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com>
Co-authored-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
Co-committed-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
2025-08-19 13:38:54 +00:00

57 lines
4.9 KiB
HTML

<a name="EN-US_TOPIC_0000001854089177"></a><a name="EN-US_TOPIC_0000001854089177"></a>
<h1 class="topictitle1">Response</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p56381426296"><strong id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_b263872112913">Status Code</strong></p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p1463842162920">After sending a request, you can receive a response, including a status code, response header, and response body.</p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p16389262913">A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a response. For more information, see <a href="vpn_api_0052.html#EN-US_TOPIC_0000001807370508">Status Codes</a>.</p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p176380272911">If status code 201 is returned after the API used to create an IAM user as an administrator is called, the request is successful.</p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p96384217292"><strong id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_b563819292915">Response Header</strong></p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p1263814216291">Like a request, a response also has a header, for example, <strong id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_b768715852313">Content-Type</strong>.</p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p663820202917">The response header shown in <a href="#EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_fig10238149134019">Figure 1</a> is returned for the API used to create an IAM user as an administrator.</p>
<div class="fignone" id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_fig10238149134019"><a name="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_fig10238149134019"></a><a name="en-us_topic_0000001543673232_fig10238149134019"></a><span class="figcap"><b>Figure 1 </b>Response header for the API used to create an IAM user as an administrator</span><br><span><img id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_image8840548519" src="figure/en-us_image_0000001594578277.png" height="223.44" width="523.6875" title="Click to enlarge" class="imgResize"></span></div>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p20697174513305"><strong id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_b1024841323716">Response Body</strong></p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p269794514306">The response body is optional. A response body is generally returned in a structured format (for example, JSON or XML), which is specified by <strong id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_b01771811153918">Content-Type</strong> in the response header. It is used to transfer content other than the response header.</p>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p1269712454305">The following provides part of the response body returned for the API used to create an IAM user as an administrator.</p>
<pre class="screen" id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_screen78283613173">{
"user": {
"id": "c131886aec...",
"name": "IAMUser",
"description": "IAM User Description",
"areacode": "",
"phone": "",
"email": "***@***.com",
"status": null,
"enabled": true,
"pwd_status": false,
"access_mode": "default",
"is_domain_owner": false,
"xuser_id": "",
"xuser_type": "",
"password_expires_at": null,
"create_time": "2024-05-21T09:03:41.000000",
"domain_id": "d78cbac1..........",
"xdomain_id": "30086000........",
"xdomain_type": "",
"default_project_id": null
}
}</pre>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p6471132310">If an error occurs during API calling, an error code and an error message will be displayed. The following is an example of an error response body.</p>
<pre class="screen" id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_screen122532509188">{
"error_msg": "Request body is invalid.",
"error_code": "IAM.0011"
}</pre>
<p id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_p178031137310"><strong id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_b098819485452">error_code</strong> specifies an error code, and <strong id="EN-US_TOPIC_0000001854089177__en-us_topic_0000001543673232_b1298964813453">error_msg</strong> describes the error.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpn_api_0008.html">Calling APIs</a></div>
</div>
</div>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>