doc-exports/docs/apig/api-ref/apig-api-190529269.html
Chen, Junjie c94ea402f5 APIG API 20230331 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2023-07-13 08:57:09 +00:00

32 lines
2.7 KiB
HTML

<a name="apig-api-190529269"></a><a name="apig-api-190529269"></a>
<h1 class="topictitle1">Response</h1>
<div id="body1559097641873"><div class="section" id="apig-api-190529269__section968114282311"><h4 class="sectiontitle">Status Code</h4><p id="apig-api-190529269__p4624111624411">After sending a request, you will receive a response, including a status code, response header, and response body.</p>
<p id="apig-api-190529269__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-en-api-180713206.html">HTTP Status Codes</a>.</p>
<p id="apig-api-190529269__p2861496519">For example, if status code <strong id="apig-api-190529269__b1944618526549">201</strong> is returned for calling the API used to create an API group (dedicated gateways), the request is successful.</p>
</div>
<div class="section" id="apig-api-190529269__section7804143005810"><h4 class="sectiontitle">Response Header</h4><p id="apig-api-190529269__p384320471837">Similar to a request, a response also has a header, for example, <strong id="apig-api-190529269__b3428039105210">Content-Type</strong>.</p>
</div>
<div class="section" id="apig-api-190529269__section034615592583"><h4 class="sectiontitle">(Optional) Response Body</h4><p id="apig-api-190529269__p133921631940">The body of a response is often returned in structured format as specified in the <strong id="apig-api-190529269__b205653394539">Content-Type</strong> header field. The response body transfers content except the response header.</p>
<p id="apig-api-190529269__p157041652367">The following is part of the response body for the API used to create an API group (dedicated gateways).</p>
<pre class="screen" id="apig-api-190529269__screen65818201917">{
"id": "<em id="apig-api-190529269__i125110305250">abcdef...</em>",
"name": "<em id="apig-api-190529269__i1240216347257">APIGroup_test</em>",
"remark": "<em id="apig-api-190529269__i1270414384258">api group remark</em>",
......
}</pre>
<p id="apig-api-190529269__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__screen102091730125513">{
"error_msg": "The token is missing.",
"error_code": "APIG.1000"
}</pre>
<p id="apig-api-190529269__p1589911464018">In the response body, <strong id="apig-api-190529269__b741208135416">error_code</strong> is an error code, and <strong id="apig-api-190529269__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-en-api-180713003.html">Calling APIs</a></div>
</div>
</div>