# 返回结果
请求发送以后，您会收到响应，包含状态码、响应消息头和消息体。
#### 状态码
状态码是一组从1xx到5xx的数字代码，状态码表示了请求响应的状态，完整的状态码列表请参见[状态码](https://support.huaweicloud.com/api-agentidentity/agentidentity_04_0013.html)。
对于[创建工作负载身份](https://support.huaweicloud.com/api-agentidentity/CreateWorkloadIdentity.html)接口，如果调用后返回状态码为"201"，则表示请求成功。
#### 响应消息头
对应请求消息头，响应同样也有消息头，如"Content-type"。
对于[创建工作负载身份](https://support.huaweicloud.com/api-agentidentity/CreateWorkloadIdentity.html)接口，返回如[图1]所示的消息头。
图1创建工作负载响应消息头
![](https://support.huaweicloud.com/api-agentidentity/zh-cn_image_0000002699128110.png)
#### 响应消息体
响应消息体通常以结构化格式返回，与响应消息头中Content-type对应，传递除响应消息头之外的内容。
对于[创建工作负载身份](https://support.huaweicloud.com/api-agentidentity/CreateWorkloadIdentity.html)接口，返回如下消息体。
```
{
  "workload_identity": {
    "workload_identity_id": "684a2c3e5f1b9d0e7a3c4f56",
    "name": "my_workload_identity",
    "urn": "agentIdentity:<region>:<account-id>:workloadIdentity:workloadIdentityDirectory/default/<workload-identity-name>",
    "authorizer_type": "CUSTOM_JWT",
    "allowed_resource_oauth2_return_urls": [
      "https://example.com/oauth2/callback"
    ],
    "created_by": {
      "type": "SERVICE",
      "identifier": "service.AgentRuntime"
    },
    "created_at": {},
    "updated_at": {},
    "tags": [
      {
        "key": "key-1",
        "value": "value-1"
      }
    ]
  }
}
```
当接口调用出错时，会返回错误码及错误信息说明，错误响应的Body体格式如下所示。
```
{
    "error_code": "AgentIdentity.0027",
    "error_msg": "workload identity already exists",
    "request_id": "***"
}
```
其中，error_code表示错误码，error_msg表示错误描述信息。
