forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
49 lines
3.9 KiB
HTML
49 lines
3.9 KiB
HTML
<a name="apig-api-190529269"></a><a name="apig-api-190529269"></a>
|
|
|
|
<h1 class="topictitle1">Response</h1>
|
|
<div id="body8662426"><p id="apig-api-190529269__en-us_topic_0172440412_p4624111624411">After sending a request, you will receive a response, including a status code, response header, and response body.</p>
|
|
<div class="section" id="apig-api-190529269__en-us_topic_0172440412_section968114282311"><h4 class="sectiontitle">Status Code</h4><p id="apig-api-190529269__en-us_topic_0172440412_p124381044137">A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a request. For more information, see <a href="apig-api-180713206.html#apig-api-180713206">HTTP Status Codes</a>.</p>
|
|
<p id="apig-api-190529269__en-us_topic_0172440412_p2861496519">For example, if status code <strong id="apig-api-190529269__en-us_topic_0172440412_b1944618526549">201</strong> is returned for calling the API used to create an API group, the request is successful.</p>
|
|
</div>
|
|
<div class="section" id="apig-api-190529269__en-us_topic_0172440412_section7804143005810"><h4 class="sectiontitle">Response Header</h4><p id="apig-api-190529269__en-us_topic_0172440412_p384320471837">Similar to a request, a response also has a header, for example, <strong id="apig-api-190529269__en-us_topic_0172440412_b3428039105210">Content-Type</strong>.</p>
|
|
<p id="apig-api-190529269__en-us_topic_0172440412_p586212517238">For example, when calling the API used to create an API group (dedicated gateways), the response headers are shown below.</p>
|
|
<div class="fignone" id="apig-api-190529269__en-us_topic_0172440412_fig11253355175215"><span class="figcap"><b>Figure 1 </b>Response headers for creating an API group</span><br><span><img id="apig-api-190529269__en-us_topic_0172440412_image4904194084419" src="en-us_image_0000001892790552.png"></span></div>
|
|
</div>
|
|
<div class="section" id="apig-api-190529269__en-us_topic_0172440412_section034615592583"><h4 class="sectiontitle">Response Body</h4><p id="apig-api-190529269__en-us_topic_0172440412_p133921631940">The body of a response is often returned in structured format as specified in the <strong id="apig-api-190529269__en-us_topic_0172440412_b205653394539">Content-Type</strong> header field. The response body transfers content except the response header.</p>
|
|
<p id="apig-api-190529269__en-us_topic_0172440412_p157041652367">The following is part of the response body for the API used to create an API group.</p>
|
|
<pre class="screen" id="apig-api-190529269__en-us_topic_0172440412_screen20451159152612">{
|
|
"id": "41e08fbaca9f4d64bde467d0dd89ff51",
|
|
"name": "aaa",
|
|
"status": 1,
|
|
"sl_domain": "41e08fbaca9f4d64bde467d0dd89ff51.example.cloudapis.com",
|
|
"register_time": "2024-05-23T08:03:56.419897855Z",
|
|
"update_time": "2024-05-23T08:03:56.419897962Z",
|
|
"on_sell_status": 2,
|
|
"url_domains": [],
|
|
"sl_domain_access_enabled": true,
|
|
"sl_domains": [
|
|
"41e08fbaca9f4d64bde467d0dd89ff51.example.cloudapis.com"
|
|
],
|
|
"remark": "",
|
|
"call_limits": 0,
|
|
"time_interval": 0,
|
|
"time_unit": "",
|
|
"is_default": 2,
|
|
"version": "",
|
|
}</pre>
|
|
<p id="apig-api-190529269__en-us_topic_0172440412_p10222124615267"></p>
|
|
<p id="apig-api-190529269__en-us_topic_0172440412_p127537375412">If an error occurs during API calling, an error code and a message will be displayed. The following shows an error response body.</p>
|
|
<pre class="screen" id="apig-api-190529269__en-us_topic_0172440412_screen102091730125513">{
|
|
"error_msg": "The token is missing.",
|
|
"error_code": "APIG.1000"
|
|
}</pre>
|
|
<p id="apig-api-190529269__en-us_topic_0172440412_p1589911464018">In the response body, <strong id="apig-api-190529269__en-us_topic_0172440412_b741208135416">error_code</strong> is an error code, and <strong id="apig-api-190529269__en-us_topic_0172440412_b68821410185416">error_msg</strong> provides information about the error.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="apig-api-180713003.html">Calling APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|