Home / API Documentation / Before you start / Response

Response

After sending a request, you will receive a response that includes a status code, response headers, and message body.

The status code is a set of numeric codes ranging from 1xx to 5xx, which represents the status of the request response. For a complete list of status codes, please refer to the Status Codes page.

When the API call is successful, it will return a normal status code and the corresponding response body message. The response body message varies depending on the API request.

Taking the Delete User API as an example, the status code is 200, and the response body is as follows:

{
    "kind": "Status",
    "apiVersion": "v1",
    "metadata": {
        
    },
    "status": "Success",
    "details": {
        "name": "89cd9f134faf20fdd49ff0205464b28a",
        "group": "auth.alauda.io",
        "kind": "users",
        "uid": "76d5ed98-be67-11e9-bf3f-52540006c2c3"
    }
}

When an interface call fails, it will return an error status code and an explanation of the error message.

Taking the Delete User interface as an example, the status code is 404, and the message in the response body is as follows:

{
    "kind": "Status",
    "apiVersion": "v1",
    "metadata": {
        
    },
    "status": "Failure",
    "message": "users.auth.alauda.io \"104@alauda.io\" not found",
    "reason": "NotFound",
    "details": {
        "name": "104@alauda.io",
        "group": "auth.alauda.io",
        "kind": "users"
    },
    "code": 404
}

The error can be traced by analyzing the information of message and reason.