Get Blob Properties
The Get Blob Properties operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.
The Get Blob Properties request may be constructed as follows. Replace myaccount with the name of your storage account:
| Method | Request URI | HTTP Version |
|---|---|---|
|
HEAD |
|
HTTP/1.1 |
When making a request against the local storage service, specify the local hostname and Blob service port as 127.0.0.1:10000, followed by the local storage account name:
| Method | Request URI | HTTP Version |
|---|---|---|
|
HEAD |
|
HTTP/1.1 |
For more information, see Windows Azure 存储模拟器概述 and 存储模拟器与 Windows Azure 存储服务之间的差异.
None.
The following table describes required and optional request headers.
| Request Header | Description |
|---|---|
|
Authorization |
Required. Specifies the authentication scheme, account name, and signature. For more information, see Authentication Schemes. |
|
Date or x-ms-date |
Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authentication Schemes. |
|
x-ms-version |
Required for all authenticated requests, optional for anonymous requests. Specifies the version of the operation to use for this request. For more information, see Storage Services Versioning. |
|
x-ms-lease-id: <ID> |
Optional. If this header is specified, the Get Blob Properties operation will be performed only if both of the following conditions are met:
If both of these conditions are not met, the request will fail and the Get Blob Properties operation will fail with status code 412 (Precondition Failed). |
This operation also supports the use of conditional headers to return blob properties and metadata only if a specified condition is met. For more information, see Specifying Conditional Headers for Blob Service Operations.
None.
The response includes an HTTP status code and a set of response headers.
A successful operation returns status code 200 (OK).
For information about status codes, see Status and Error Codes.
The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
| Response header | Description |
|---|---|
|
Last-Modified |
The date/time that the blob was last modified. The date format follows RFC 1123. For more information, see Representation of Date/Time Values in Headers. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last modified time of the blob. |
|
x-ms-meta-name:value |
A set of name-value pairs that correspond to the user-defined metadata associated with this blob. |
|
x-ms-blob-type:<BlockBlob|PageBlob> |
The blob type. |
|
x-ms-lease-status:<locked| unlocked> |
The lease status of the blob. |
|
Content-Length |
The size of the blob in bytes. For a page blob, this header returns the value of the x-ms-blob-content-length header that is stored with the blob. |
|
Content-Type |
The content type specified for the blob. If no content type was specified, the default content type is application/octet-stream. |
|
Etag |
The ETag contains a value that the client can use to perform conditional GET operations by using the If-Modified request header. |
|
Content-MD5 |
If the Content-MD5 header has been set for the blob, this response header is returned so that the client can check for message content integrity. |
|
Content-Encoding |
If the Content-Encoding request header has previously been set for the blob, that value is returned in this header. |
|
Content-Language |
If the Content-Language request header has previously been set for the blob, that value is returned in this header. |
|
Cache-Control |
If the Cache-Control request header has previously been set for the blob, that value is returned in this header. |
|
x-ms-blob-sequence-number |
The current sequence number for a page blob. This header is not returned for block blobs. |
|
x-ms-request-id |
This header uniquely identifies the request that was made and can be used for troubleshooting the request. For more information, see Troubleshooting API Operations. |
|
x-ms-version |
Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and later. This header is also returned for anonymous requests without a version specified if the container was marked for public access using the 2009-09-19 version of the Blob service. |
|
Date |
A UTC date/time value generated by the service that indicates the time at which the response was initiated. |
None.
Response Status: HTTP/1.1 200 OK Response Headers: x-ms-meta-Name: myblob.txt x-ms-meta-DateUploaded: Sun, 20 Sep 2009 18:45:18 GMT x-ms-blob-type: BlockBlob x-ms-lease-status: unlocked Content-Length: 11 Content-Type: text/plain; charset=UTF-8 Date: Sun, 27 Sep 2009 19:49:38 GMT ETag: 0x8CAE97120C1FF22 x-ms-version: 2009-09-19 Last-Modified: Sun, 27 Sep 2009 19:49:28 GMT
If the container's ACL is set to allow anonymous access, any client may call this operation.
None.