更新时间:2024-01-25 GMT+08:00
分享

返回结果

状态码

请求发送以后,您会收到响应,包含状态码、响应消息头和消息体。

状态码是一组从1xx到5xx的数字代码,状态码表示了请求响应的状态,完整的状态码列表请参见状态码

对于创建客户接口,如果调用后返回状态码为“204”,则表示请求成功。

响应消息头

对应请求消息头,响应同样也有消息头,如“Content-type”

对于创建客户接口,返回如图1所示的消息头。

图1 创建客户响应消息头

响应消息体(可选)

响应消息体通常以结构化格式(如JSON或XML)返回,与响应消息头中Content-Type对应,传递除响应消息头之外的内容

对于创建客户接口,返回如下消息体。

1
2
3
4
5
6
7
8
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  
{
    "domain_id": "08f25edee500d3e70f4ec007d082eb80",
    "domain_name": "testdomainnamexxx"
}

当接口调用出错时,会返回错误码及错误信息说明,错误响应的Body体格式如下所示。

1
2
3
4
{
    "error_msg": "The name exists.cse://CBCCustomerRegService/rest/cbc/cbccustomerregservice/v1/customer/register[error_code]:CBC.7156[msg]:{\"error_code\":\"CBC.7156\",\"error_msg\":\"domainName exist.\"} ",
    "error_code": "CBC.99000038"
}

其中,error_code表示错误码,error_msg表示错误描述信息。

分享:

    相关文档

    相关产品