Updated on 2024-03-05 GMT+08:00

Returned Values

After sending a request, you will receive a response, including the status code, response header, and response body.

Status Codes

A status code is a group of digits ranging from 2xx (indicating successes) to 4xx or 5xx (indicating errors). It indicates the status of a response. For more information, see Status Codes.

Response Headers

A response header corresponds to a request header, for example, Content-Type.

For details about common response headers, see Table 1.
Table 1 Common response headers

Header

Description

Content-Length

The length (in bytes) of the response body.

Type: string

Default value: none

Connection

Indicates whether the connection to the server is a long connection or a short connection.

Type: string

Value options: keep-alive, close

Default value: none

Date

The date and time at which OBS responds to the request.

Type: string

Default value: none

ETag

128-bit MD5 digest of the Base64 code of an object. ETag is the unique identifier of the object content. It can be used to identify whether the object content is changed. For example, if ETag value is A when an object is uploaded and the ETag value has changed to B when the object is downloaded, it indicates that the object content is changed. The actual ETag is the hash value of the object, which only reflects the changed content rather than the metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5. If an object is uploaded in the multipart mode, the MD5 splits ETag regardless of the encryption method. In this case, the ETag is not an MD5 digest.

Type: string

x-obs-id-2

A special symbol that helps troubleshoot faults.

Type: string

Default value: none

x-reserved-indicator

A special symbol that helps troubleshoot faults.

Type: string

Default value: none

x-obs-request-id

The value created by OBS to uniquely identify the request. OBS uses this value to troubleshoot faults.

Type: string

Default value: none

(Optional) Response Body

A response body is generally returned in a structured format (for example, JSON or XML), corresponding to Content-Type in the response header, and is used to transfer content other than the response header.