diff --git a/docs/obs/api-swift/ALL_META.TXT.json b/docs/obs/api-swift/ALL_META.TXT.json new file mode 100644 index 000000000..a74d44241 --- /dev/null +++ b/docs/obs/api-swift/ALL_META.TXT.json @@ -0,0 +1,802 @@ +[ + { + "uri":"obs_03_0001.html", + "product_code":"obs", + "code":"1", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Overview", + "title":"Overview", + "githuburl":"" + }, + { + "uri":"obs_03_0002.html", + "product_code":"obs", + "code":"2", + "des":"OBS (compatible with OpenStack Swift) is provided based on simple web service APIs. OBS helps construct storage-based Internet applications such as web hosting as well as", + "doc_type":"api_swift", + "kw":"Functions,Overview,API Reference (Swift)", + "title":"Functions", + "githuburl":"" + }, + { + "uri":"obs_03_0003.html", + "product_code":"obs", + "code":"3", + "des":"REST APIs support standard HTTP headers and status codes. IAM is used to manage online authentication for access security.APIs provided by OBS (compatible with OpenStack ", + "doc_type":"api_swift", + "kw":"API Overview,Overview,API Reference (Swift)", + "title":"API Overview", + "githuburl":"" + }, + { + "uri":"obs_03_0004.html", + "product_code":"obs", + "code":"4", + "des":"After a success message is returned in response to a client's write or deletion request, the client can obtain the latest data. If the client that initiated a write reque", + "doc_type":"api_swift", + "kw":"Concurrent Operation Consistency,Overview,API Reference (Swift)", + "title":"Concurrent Operation Consistency", + "githuburl":"" + }, + { + "uri":"obs_03_0005.html", + "product_code":"obs", + "code":"5", + "des":"OBS (compatible with OpenStack Swift) updates the same metadata when processing concurrent PUT or DELETE operations on objects in a container. Performance of these operat", + "doc_type":"api_swift", + "kw":"Suggestions on Container Performance Tuning,Overview,API Reference (Swift)", + "title":"Suggestions on Container Performance Tuning", + "githuburl":"" + }, + { + "uri":"obs_03_0006.html", + "product_code":"obs", + "code":"6", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Methods of Calling APIs", + "title":"Methods of Calling APIs", + "githuburl":"" + }, + { + "uri":"obs_03_0007.html", + "product_code":"obs", + "code":"7", + "des":"In REST, specific information or data on a network is represented by a resource, which is referenced with a uniform resource identifier (URI). Clients on a network can lo", + "doc_type":"api_swift", + "kw":"Locating a Resource,Methods of Calling APIs,API Reference (Swift)", + "title":"Locating a Resource", + "githuburl":"" + }, + { + "uri":"obs_03_0008.html", + "product_code":"obs", + "code":"8", + "des":"A request sent to OBS (compatible with OpenStack Swift) must comply with HTTP 1.1. In addition, the headers of a request must contain parameters defined in IAM, for examp", + "doc_type":"api_swift", + "kw":"Request Methods,Methods of Calling APIs,API Reference (Swift)", + "title":"Request Methods", + "githuburl":"" + }, + { + "uri":"obs_03_0009.html", + "product_code":"obs", + "code":"9", + "des":"If a request contains a container name or an object name, OBS (compatible with OpenStack Swift) starts to process the request only after checking that the name conforms t", + "doc_type":"api_swift", + "kw":"Naming Rules,Methods of Calling APIs,API Reference (Swift)", + "title":"Naming Rules", + "githuburl":"" + }, + { + "uri":"obs_03_0010.html", + "product_code":"obs", + "code":"10", + "des":"Users of OBS (compatible with OpenStack Swift) must be authenticated using IAM. In a request sent by a client to OBS (compatible with OpenStack Swift), the request header", + "doc_type":"api_swift", + "kw":"Authenticating a Request,Methods of Calling APIs,API Reference (Swift)", + "title":"Authenticating a Request", + "githuburl":"" + }, + { + "uri":"obs_03_0011.html", + "product_code":"obs", + "code":"11", + "des":"OBS (compatible with OpenStack Swift) returns an HTTP response after receiving and processing a request.The first line of a response is the Status-Line, consisting of the", + "doc_type":"api_swift", + "kw":"Responses,Methods of Calling APIs,API Reference (Swift)", + "title":"Responses", + "githuburl":"" + }, + { + "uri":"obs_03_0012.html", + "product_code":"obs", + "code":"12", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Error Responses", + "title":"Error Responses", + "githuburl":"" + }, + { + "uri":"obs_03_0013.html", + "product_code":"obs", + "code":"13", + "des":"If OBS (compatible with OpenStack Swift) encounters an error when processing a request, a response containing the error code and error description is returned. Table 1 de", + "doc_type":"api_swift", + "kw":"Error Code List,Error Responses,API Reference (Swift)", + "title":"Error Code List", + "githuburl":"" + }, + { + "uri":"obs_03_0014.html", + "product_code":"obs", + "code":"14", + "des":"When an error occurs, the header information contains:Content-Type: application/*, which may be in HTML or text formatHTTP status code 3xx, 4xx, or 5xx. For details, see ", + "doc_type":"api_swift", + "kw":"Error Response Syntax,Error Responses,API Reference (Swift)", + "title":"Error Response Syntax", + "githuburl":"" + }, + { + "uri":"obs_03_0015.html", + "product_code":"obs", + "code":"15", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Operations on Accounts", + "title":"Operations on Accounts", + "githuburl":"" + }, + { + "uri":"obs_03_0016.html", + "product_code":"obs", + "code":"16", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Show Account Details and List Containers", + "title":"Show Account Details and List Containers", + "githuburl":"" + }, + { + "uri":"obs_03_0017.html", + "product_code":"obs", + "code":"17", + "des":"{account} indicates the name of an account.This operation does not involve a request body.Show account details and list containers, and ask for a JSON response:Request UR", + "doc_type":"api_swift", + "kw":"Request,Show Account Details and List Containers,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0018.html", + "product_code":"obs", + "code":"18", + "des":"If the response format is json or xml, container details are shown. The following table describes the response body parameters:For performance purposes, of the response h", + "doc_type":"api_swift", + "kw":"Response,Show Account Details and List Containers,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0019.html", + "product_code":"obs", + "code":"19", + "des":"Show account details and list containers. Do not set a query parameter. Use the default plain response format.Show account details and list containers. Use the prefix=abc", + "doc_type":"api_swift", + "kw":"Examples,Show Account Details and List Containers,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0020.html", + "product_code":"obs", + "code":"20", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Create/Update/Delete Account Metadata", + "title":"Create/Update/Delete Account Metadata", + "githuburl":"" + }, + { + "uri":"obs_03_0021.html", + "product_code":"obs", + "code":"21", + "des":"{account} indicates the name of an account.Metadata creation or update depends on whether the specified metadata already exists. Existing metadata is updated, and missing", + "doc_type":"api_swift", + "kw":"Request,Create/Update/Delete Account Metadata,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0022.html", + "product_code":"obs", + "code":"22", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Response,Create/Update/Delete Account Metadata,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0023.html", + "product_code":"obs", + "code":"23", + "des":"Create Book and Subject metadata:Update the Subject metadata:Delete the Subject metadata:", + "doc_type":"api_swift", + "kw":"Examples,Create/Update/Delete Account Metadata,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0024.html", + "product_code":"obs", + "code":"24", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Show Account Metadata", + "title":"Show Account Metadata", + "githuburl":"" + }, + { + "uri":"obs_03_0025.html", + "product_code":"obs", + "code":"25", + "des":"{account} indicates the name of an account. Metadata of an account includes the number of containers, number of objects, and total number of bytes that are stored in OBS ", + "doc_type":"api_swift", + "kw":"Request,Show Account Metadata,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0026.html", + "product_code":"obs", + "code":"26", + "des":"The following table describes the response headers:", + "doc_type":"api_swift", + "kw":"Response,Show Account Metadata,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0027.html", + "product_code":"obs", + "code":"27", + "des":"Show account metadata.", + "doc_type":"api_swift", + "kw":"Examples,Show Account Metadata,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0028.html", + "product_code":"obs", + "code":"28", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Operations on Containers", + "title":"Operations on Containers", + "githuburl":"" + }, + { + "uri":"obs_03_0029.html", + "product_code":"obs", + "code":"29", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Show Container Details and List Objects", + "title":"Show Container Details and List Objects", + "githuburl":"" + }, + { + "uri":"obs_03_0030.html", + "product_code":"obs", + "code":"30", + "des":"{account} indicates the name of an account.{container} indicates the name of a container.This operation does not involve a request body.Show container details for and lis", + "doc_type":"api_swift", + "kw":"Request,Show Container Details and List Objects,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0031.html", + "product_code":"obs", + "code":"31", + "des":"If the response format is json or xml, object details are shown. Table 1 describes the response body parameters:", + "doc_type":"api_swift", + "kw":"Response,Show Container Details and List Objects,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0032.html", + "product_code":"obs", + "code":"32", + "des":"Show metadata of the testcontainer container and list objects. Do not set a query parameter. Use the default plain response format.Show metadata of the testcontainer cont", + "doc_type":"api_swift", + "kw":"Examples,Show Container Details and List Objects,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0033.html", + "product_code":"obs", + "code":"33", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Create Container", + "title":"Create Container", + "githuburl":"" + }, + { + "uri":"obs_03_0034.html", + "product_code":"obs", + "code":"34", + "des":"{account} indicates the name of an account.{container} indicates the name of a container.This operation does not involve a request body.Create a container named marktwain", + "doc_type":"api_swift", + "kw":"Request,Create Container,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0035.html", + "product_code":"obs", + "code":"35", + "des":"The request does not include response body parameters.All the error responses are contained in Table 1.", + "doc_type":"api_swift", + "kw":"Response,Create Container,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0036.html", + "product_code":"obs", + "code":"36", + "des":"Create a container named marktwain:Container marktwain exists. Create it again.Create a container and specify the X-Container-Read metadata.", + "doc_type":"api_swift", + "kw":"Examples,Create Container,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0037.html", + "product_code":"obs", + "code":"37", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Delete Container", + "title":"Delete Container", + "githuburl":"" + }, + { + "uri":"obs_03_0038.html", + "product_code":"obs", + "code":"38", + "des":"{account} indicates the name of an account. {container} indicates the name of a container.This operation does not involve a request body.Delete the empty containers from ", + "doc_type":"api_swift", + "kw":"Request,Delete Container,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0039.html", + "product_code":"obs", + "code":"39", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Response,Delete Container,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0040.html", + "product_code":"obs", + "code":"40", + "des":"Delete an empty steven container:Delete the non-existing steve container:Delete the non-empty CONTAINER container:", + "doc_type":"api_swift", + "kw":"Examples,Delete Container,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0041.html", + "product_code":"obs", + "code":"41", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Create/Update/Delete Container Metadata", + "title":"Create/Update/Delete Container Metadata", + "githuburl":"" + }, + { + "uri":"obs_03_0042.html", + "product_code":"obs", + "code":"42", + "des":"{account} indicates the name of an account. {container} indicates the name of a container.Metadata creation or update depends on whether the specified metadata already ex", + "doc_type":"api_swift", + "kw":"Request,Create/Update/Delete Container Metadata,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0043.html", + "product_code":"obs", + "code":"43", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Response,Create/Update/Delete Container Metadata,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0044.html", + "product_code":"obs", + "code":"44", + "des":"Create container metadata Author with the value set to MarkTwain:Update container metadata Author with the value set to Other:Delete container metadata Author with the va", + "doc_type":"api_swift", + "kw":"Examples,Create/Update/Delete Container Metadata,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0045.html", + "product_code":"obs", + "code":"45", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Show Container Metadata", + "title":"Show Container Metadata", + "githuburl":"" + }, + { + "uri":"obs_03_0046.html", + "product_code":"obs", + "code":"46", + "des":"{account} indicates the name of an account.{container} indicates the name of a container.This operation does not involve a request body.Show metadata of container marktwa", + "doc_type":"api_swift", + "kw":"Request,Show Container Metadata,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0047.html", + "product_code":"obs", + "code":"47", + "des":"The following table describes the response headers:", + "doc_type":"api_swift", + "kw":"Response,Show Container Metadata,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0048.html", + "product_code":"obs", + "code":"48", + "des":"Show metadata of container marktwain:", + "doc_type":"api_swift", + "kw":"Examples,Show Container Metadata,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0049.html", + "product_code":"obs", + "code":"49", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Batch Delete Containers", + "title":"Batch Delete Containers", + "githuburl":"" + }, + { + "uri":"obs_03_0050.html", + "product_code":"obs", + "code":"50", + "des":"{account} indicates the name of an account.The request body is a text file that includes the containers to be deleted. Each line in the text file represents a container t", + "doc_type":"api_swift", + "kw":"Request,Batch Delete Containers,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0051.html", + "product_code":"obs", + "code":"51", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Response,Batch Delete Containers,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0052.html", + "product_code":"obs", + "code":"52", + "des":"Delete two empty containers: 8projectidprojectidproject000023.bucket.test6.0 and 8projectidprojectidproject000023.bucket.test6.1, and delete the container text file delet", + "doc_type":"api_swift", + "kw":"Examples,Batch Delete Containers,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0053.html", + "product_code":"obs", + "code":"53", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Operations on Objects", + "title":"Operations on Objects", + "githuburl":"" + }, + { + "uri":"obs_03_0054.html", + "product_code":"obs", + "code":"54", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Get Object Content and Metadata", + "title":"Get Object Content and Metadata", + "githuburl":"" + }, + { + "uri":"obs_03_0055.html", + "product_code":"obs", + "code":"55", + "des":"{account} indicates the name of an account. {container} indicates the name of a container. {object} indicates the name of an object.This operation does not involve a requ", + "doc_type":"api_swift", + "kw":"Request,Get Object Content and Metadata,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0056.html", + "product_code":"obs", + "code":"56", + "des":"The following table describes the response headers:If the MIME type of the object in the object upload is not in XXX/XXX format, OBS (compatible with OpenStack Swift) use", + "doc_type":"api_swift", + "kw":"Response,Get Object Content and Metadata,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0057.html", + "product_code":"obs", + "code":"57", + "des":"Show the content and metadata of the goodbye object in the marktwain container:Show object details for the notexist object, which does not exist, in the marktwain contain", + "doc_type":"api_swift", + "kw":"Examples,Get Object Content and Metadata,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0058.html", + "product_code":"obs", + "code":"58", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Create or Replace Object", + "title":"Create or Replace Object", + "githuburl":"" + }, + { + "uri":"obs_03_0059.html", + "product_code":"obs", + "code":"59", + "des":"{account} indicates the name of an account. {container} indicates the name of a container. {object} indicates the name of an object.The request body of this operation is ", + "doc_type":"api_swift", + "kw":"Request,Create or Replace Object,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0060.html", + "product_code":"obs", + "code":"60", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Response,Create or Replace Object,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0061.html", + "product_code":"obs", + "code":"61", + "des":"Create marktwain/goodbye:Replace marktwain/goodbye (repeated creation):", + "doc_type":"api_swift", + "kw":"Examples,Create or Replace Object,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0062.html", + "product_code":"obs", + "code":"62", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Copy Object", + "title":"Copy Object", + "githuburl":"" + }, + { + "uri":"obs_03_0063.html", + "product_code":"obs", + "code":"63", + "des":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.This operation does not involve a reques", + "doc_type":"api_swift", + "kw":"Request,Copy Object,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0064.html", + "product_code":"obs", + "code":"64", + "des":"The following table describes response header parameters:", + "doc_type":"api_swift", + "kw":"Response,Copy Object,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0065.html", + "product_code":"obs", + "code":"65", + "des":"Use the COPY command to copy an object. In this example, the source object is janeausten/goodby and the destination object is marketwain/goodbye.Use the PUT command to co", + "doc_type":"api_swift", + "kw":"Examples,Copy Object,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0066.html", + "product_code":"obs", + "code":"66", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Delete Object", + "title":"Delete Object", + "githuburl":"" + }, + { + "uri":"obs_03_0067.html", + "product_code":"obs", + "code":"67", + "des":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.This operation does not involve a reques", + "doc_type":"api_swift", + "kw":"Request,Delete Object,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0068.html", + "product_code":"obs", + "code":"68", + "des":"The following table describes response header parameters:", + "doc_type":"api_swift", + "kw":"Response,Delete Object,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0069.html", + "product_code":"obs", + "code":"69", + "des":"Delete the goodbye object from the janeausten container:Delete the non-existing goodbye object from the janeausten container:", + "doc_type":"api_swift", + "kw":"Examples,Delete Object,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0070.html", + "product_code":"obs", + "code":"70", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Show Object Metadata", + "title":"Show Object Metadata", + "githuburl":"" + }, + { + "uri":"obs_03_0071.html", + "product_code":"obs", + "code":"71", + "des":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.This operation does not involve a reques", + "doc_type":"api_swift", + "kw":"Request,Show Object Metadata,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0072.html", + "product_code":"obs", + "code":"72", + "des":"The following table describes response header parameters:", + "doc_type":"api_swift", + "kw":"Response,Show Object Metadata,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0073.html", + "product_code":"obs", + "code":"73", + "des":"Show metadata of the goodbye object in the marketwain container:", + "doc_type":"api_swift", + "kw":"Examples,Show Object Metadata,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0074.html", + "product_code":"obs", + "code":"74", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Create/Update/Delete Object Metadata", + "title":"Create/Update/Delete Object Metadata", + "githuburl":"" + }, + { + "uri":"obs_03_0075.html", + "product_code":"obs", + "code":"75", + "des":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.A POST request deletes all existing user", + "doc_type":"api_swift", + "kw":"Request,Create/Update/Delete Object Metadata,API Reference (Swift)", + "title":"Request", + "githuburl":"" + }, + { + "uri":"obs_03_0076.html", + "product_code":"obs", + "code":"76", + "des":"The following table describes response header parameters:", + "doc_type":"api_swift", + "kw":"Response,Create/Update/Delete Object Metadata,API Reference (Swift)", + "title":"Response", + "githuburl":"" + }, + { + "uri":"obs_03_0077.html", + "product_code":"obs", + "code":"77", + "des":"Create object metadata Author with the value set to other:Update object metadata Author with the value set to marktwain:Delete the metadata author, and leave the value bl", + "doc_type":"api_swift", + "kw":"Examples,Create/Update/Delete Object Metadata,API Reference (Swift)", + "title":"Examples", + "githuburl":"" + }, + { + "uri":"obs_03_0078.html", + "product_code":"obs", + "code":"78", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Glossary,API Reference (Swift)", + "title":"Glossary", + "githuburl":"" + }, + { + "uri":"obs_03_0079.html", + "product_code":"obs", + "code":"79", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api_swift", + "kw":"Acronyms and Abbreviations,API Reference (Swift)", + "title":"Acronyms and Abbreviations", + "githuburl":"" + }, + { + "uri":"obs_03_0080.html", + "product_code":"obs", + "code":"80", + "des":"Released OnWhat's New2021-12-10This is the second official release.This issue incorporates the following change:Optimized some descriptions.2018-03-15This is the first of", + "doc_type":"api_swift", + "kw":"Change History,API Reference (Swift)", + "title":"Change History", + "githuburl":"" + } +] \ No newline at end of file diff --git a/docs/obs/api-swift/CLASS.TXT.json b/docs/obs/api-swift/CLASS.TXT.json new file mode 100644 index 000000000..d460047d5 --- /dev/null +++ b/docs/obs/api-swift/CLASS.TXT.json @@ -0,0 +1,722 @@ +[ + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Overview", + "uri":"obs_03_0001.html", + "doc_type":"api_swift", + "p_code":"", + "code":"1" + }, + { + "desc":"OBS (compatible with OpenStack Swift) is provided based on simple web service APIs. OBS helps construct storage-based Internet applications such as web hosting as well as", + "product_code":"obs", + "title":"Functions", + "uri":"obs_03_0002.html", + "doc_type":"api_swift", + "p_code":"1", + "code":"2" + }, + { + "desc":"REST APIs support standard HTTP headers and status codes. IAM is used to manage online authentication for access security.APIs provided by OBS (compatible with OpenStack ", + "product_code":"obs", + "title":"API Overview", + "uri":"obs_03_0003.html", + "doc_type":"api_swift", + "p_code":"1", + "code":"3" + }, + { + "desc":"After a success message is returned in response to a client's write or deletion request, the client can obtain the latest data. If the client that initiated a write reque", + "product_code":"obs", + "title":"Concurrent Operation Consistency", + "uri":"obs_03_0004.html", + "doc_type":"api_swift", + "p_code":"1", + "code":"4" + }, + { + "desc":"OBS (compatible with OpenStack Swift) updates the same metadata when processing concurrent PUT or DELETE operations on objects in a container. Performance of these operat", + "product_code":"obs", + "title":"Suggestions on Container Performance Tuning", + "uri":"obs_03_0005.html", + "doc_type":"api_swift", + "p_code":"1", + "code":"5" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Methods of Calling APIs", + "uri":"obs_03_0006.html", + "doc_type":"api_swift", + "p_code":"", + "code":"6" + }, + { + "desc":"In REST, specific information or data on a network is represented by a resource, which is referenced with a uniform resource identifier (URI). Clients on a network can lo", + "product_code":"obs", + "title":"Locating a Resource", + "uri":"obs_03_0007.html", + "doc_type":"api_swift", + "p_code":"6", + "code":"7" + }, + { + "desc":"A request sent to OBS (compatible with OpenStack Swift) must comply with HTTP 1.1. In addition, the headers of a request must contain parameters defined in IAM, for examp", + "product_code":"obs", + "title":"Request Methods", + "uri":"obs_03_0008.html", + "doc_type":"api_swift", + "p_code":"6", + "code":"8" + }, + { + "desc":"If a request contains a container name or an object name, OBS (compatible with OpenStack Swift) starts to process the request only after checking that the name conforms t", + "product_code":"obs", + "title":"Naming Rules", + "uri":"obs_03_0009.html", + "doc_type":"api_swift", + "p_code":"6", + "code":"9" + }, + { + "desc":"Users of OBS (compatible with OpenStack Swift) must be authenticated using IAM. In a request sent by a client to OBS (compatible with OpenStack Swift), the request header", + "product_code":"obs", + "title":"Authenticating a Request", + "uri":"obs_03_0010.html", + "doc_type":"api_swift", + "p_code":"6", + "code":"10" + }, + { + "desc":"OBS (compatible with OpenStack Swift) returns an HTTP response after receiving and processing a request.The first line of a response is the Status-Line, consisting of the", + "product_code":"obs", + "title":"Responses", + "uri":"obs_03_0011.html", + "doc_type":"api_swift", + "p_code":"6", + "code":"11" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Error Responses", + "uri":"obs_03_0012.html", + "doc_type":"api_swift", + "p_code":"", + "code":"12" + }, + { + "desc":"If OBS (compatible with OpenStack Swift) encounters an error when processing a request, a response containing the error code and error description is returned. Table 1 de", + "product_code":"obs", + "title":"Error Code List", + "uri":"obs_03_0013.html", + "doc_type":"api_swift", + "p_code":"12", + "code":"13" + }, + { + "desc":"When an error occurs, the header information contains:Content-Type: application/*, which may be in HTML or text formatHTTP status code 3xx, 4xx, or 5xx. For details, see ", + "product_code":"obs", + "title":"Error Response Syntax", + "uri":"obs_03_0014.html", + "doc_type":"api_swift", + "p_code":"12", + "code":"14" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Operations on Accounts", + "uri":"obs_03_0015.html", + "doc_type":"api_swift", + "p_code":"", + "code":"15" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Show Account Details and List Containers", + "uri":"obs_03_0016.html", + "doc_type":"api_swift", + "p_code":"15", + "code":"16" + }, + { + "desc":"{account} indicates the name of an account.This operation does not involve a request body.Show account details and list containers, and ask for a JSON response:Request UR", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0017.html", + "doc_type":"api_swift", + "p_code":"16", + "code":"17" + }, + { + "desc":"If the response format is json or xml, container details are shown. The following table describes the response body parameters:For performance purposes, of the response h", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0018.html", + "doc_type":"api_swift", + "p_code":"16", + "code":"18" + }, + { + "desc":"Show account details and list containers. Do not set a query parameter. Use the default plain response format.Show account details and list containers. Use the prefix=abc", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0019.html", + "doc_type":"api_swift", + "p_code":"16", + "code":"19" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Create/Update/Delete Account Metadata", + "uri":"obs_03_0020.html", + "doc_type":"api_swift", + "p_code":"15", + "code":"20" + }, + { + "desc":"{account} indicates the name of an account.Metadata creation or update depends on whether the specified metadata already exists. Existing metadata is updated, and missing", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0021.html", + "doc_type":"api_swift", + "p_code":"20", + "code":"21" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0022.html", + "doc_type":"api_swift", + "p_code":"20", + "code":"22" + }, + { + "desc":"Create Book and Subject metadata:Update the Subject metadata:Delete the Subject metadata:", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0023.html", + "doc_type":"api_swift", + "p_code":"20", + "code":"23" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Show Account Metadata", + "uri":"obs_03_0024.html", + "doc_type":"api_swift", + "p_code":"15", + "code":"24" + }, + { + "desc":"{account} indicates the name of an account. Metadata of an account includes the number of containers, number of objects, and total number of bytes that are stored in OBS ", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0025.html", + "doc_type":"api_swift", + "p_code":"24", + "code":"25" + }, + { + "desc":"The following table describes the response headers:", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0026.html", + "doc_type":"api_swift", + "p_code":"24", + "code":"26" + }, + { + "desc":"Show account metadata.", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0027.html", + "doc_type":"api_swift", + "p_code":"24", + "code":"27" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Operations on Containers", + "uri":"obs_03_0028.html", + "doc_type":"api_swift", + "p_code":"", + "code":"28" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Show Container Details and List Objects", + "uri":"obs_03_0029.html", + "doc_type":"api_swift", + "p_code":"28", + "code":"29" + }, + { + "desc":"{account} indicates the name of an account.{container} indicates the name of a container.This operation does not involve a request body.Show container details for and lis", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0030.html", + "doc_type":"api_swift", + "p_code":"29", + "code":"30" + }, + { + "desc":"If the response format is json or xml, object details are shown. Table 1 describes the response body parameters:", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0031.html", + "doc_type":"api_swift", + "p_code":"29", + "code":"31" + }, + { + "desc":"Show metadata of the testcontainer container and list objects. Do not set a query parameter. Use the default plain response format.Show metadata of the testcontainer cont", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0032.html", + "doc_type":"api_swift", + "p_code":"29", + "code":"32" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Create Container", + "uri":"obs_03_0033.html", + "doc_type":"api_swift", + "p_code":"28", + "code":"33" + }, + { + "desc":"{account} indicates the name of an account.{container} indicates the name of a container.This operation does not involve a request body.Create a container named marktwain", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0034.html", + "doc_type":"api_swift", + "p_code":"33", + "code":"34" + }, + { + "desc":"The request does not include response body parameters.All the error responses are contained in Table 1.", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0035.html", + "doc_type":"api_swift", + "p_code":"33", + "code":"35" + }, + { + "desc":"Create a container named marktwain:Container marktwain exists. Create it again.Create a container and specify the X-Container-Read metadata.", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0036.html", + "doc_type":"api_swift", + "p_code":"33", + "code":"36" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Delete Container", + "uri":"obs_03_0037.html", + "doc_type":"api_swift", + "p_code":"28", + "code":"37" + }, + { + "desc":"{account} indicates the name of an account. {container} indicates the name of a container.This operation does not involve a request body.Delete the empty containers from ", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0038.html", + "doc_type":"api_swift", + "p_code":"37", + "code":"38" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0039.html", + "doc_type":"api_swift", + "p_code":"37", + "code":"39" + }, + { + "desc":"Delete an empty steven container:Delete the non-existing steve container:Delete the non-empty CONTAINER container:", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0040.html", + "doc_type":"api_swift", + "p_code":"37", + "code":"40" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Create/Update/Delete Container Metadata", + "uri":"obs_03_0041.html", + "doc_type":"api_swift", + "p_code":"28", + "code":"41" + }, + { + "desc":"{account} indicates the name of an account. {container} indicates the name of a container.Metadata creation or update depends on whether the specified metadata already ex", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0042.html", + "doc_type":"api_swift", + "p_code":"41", + "code":"42" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0043.html", + "doc_type":"api_swift", + "p_code":"41", + "code":"43" + }, + { + "desc":"Create container metadata Author with the value set to MarkTwain:Update container metadata Author with the value set to Other:Delete container metadata Author with the va", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0044.html", + "doc_type":"api_swift", + "p_code":"41", + "code":"44" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Show Container Metadata", + "uri":"obs_03_0045.html", + "doc_type":"api_swift", + "p_code":"28", + "code":"45" + }, + { + "desc":"{account} indicates the name of an account.{container} indicates the name of a container.This operation does not involve a request body.Show metadata of container marktwa", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0046.html", + "doc_type":"api_swift", + "p_code":"45", + "code":"46" + }, + { + "desc":"The following table describes the response headers:", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0047.html", + "doc_type":"api_swift", + "p_code":"45", + "code":"47" + }, + { + "desc":"Show metadata of container marktwain:", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0048.html", + "doc_type":"api_swift", + "p_code":"45", + "code":"48" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Batch Delete Containers", + "uri":"obs_03_0049.html", + "doc_type":"api_swift", + "p_code":"28", + "code":"49" + }, + { + "desc":"{account} indicates the name of an account.The request body is a text file that includes the containers to be deleted. Each line in the text file represents a container t", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0050.html", + "doc_type":"api_swift", + "p_code":"49", + "code":"50" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0051.html", + "doc_type":"api_swift", + "p_code":"49", + "code":"51" + }, + { + "desc":"Delete two empty containers: 8projectidprojectidproject000023.bucket.test6.0 and 8projectidprojectidproject000023.bucket.test6.1, and delete the container text file delet", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0052.html", + "doc_type":"api_swift", + "p_code":"49", + "code":"52" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Operations on Objects", + "uri":"obs_03_0053.html", + "doc_type":"api_swift", + "p_code":"", + "code":"53" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Get Object Content and Metadata", + "uri":"obs_03_0054.html", + "doc_type":"api_swift", + "p_code":"53", + "code":"54" + }, + { + "desc":"{account} indicates the name of an account. {container} indicates the name of a container. {object} indicates the name of an object.This operation does not involve a requ", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0055.html", + "doc_type":"api_swift", + "p_code":"54", + "code":"55" + }, + { + "desc":"The following table describes the response headers:If the MIME type of the object in the object upload is not in XXX/XXX format, OBS (compatible with OpenStack Swift) use", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0056.html", + "doc_type":"api_swift", + "p_code":"54", + "code":"56" + }, + { + "desc":"Show the content and metadata of the goodbye object in the marktwain container:Show object details for the notexist object, which does not exist, in the marktwain contain", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0057.html", + "doc_type":"api_swift", + "p_code":"54", + "code":"57" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Create or Replace Object", + "uri":"obs_03_0058.html", + "doc_type":"api_swift", + "p_code":"53", + "code":"58" + }, + { + "desc":"{account} indicates the name of an account. {container} indicates the name of a container. {object} indicates the name of an object.The request body of this operation is ", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0059.html", + "doc_type":"api_swift", + "p_code":"58", + "code":"59" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0060.html", + "doc_type":"api_swift", + "p_code":"58", + "code":"60" + }, + { + "desc":"Create marktwain/goodbye:Replace marktwain/goodbye (repeated creation):", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0061.html", + "doc_type":"api_swift", + "p_code":"58", + "code":"61" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Copy Object", + "uri":"obs_03_0062.html", + "doc_type":"api_swift", + "p_code":"53", + "code":"62" + }, + { + "desc":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.This operation does not involve a reques", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0063.html", + "doc_type":"api_swift", + "p_code":"62", + "code":"63" + }, + { + "desc":"The following table describes response header parameters:", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0064.html", + "doc_type":"api_swift", + "p_code":"62", + "code":"64" + }, + { + "desc":"Use the COPY command to copy an object. In this example, the source object is janeausten/goodby and the destination object is marketwain/goodbye.Use the PUT command to co", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0065.html", + "doc_type":"api_swift", + "p_code":"62", + "code":"65" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Delete Object", + "uri":"obs_03_0066.html", + "doc_type":"api_swift", + "p_code":"53", + "code":"66" + }, + { + "desc":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.This operation does not involve a reques", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0067.html", + "doc_type":"api_swift", + "p_code":"66", + "code":"67" + }, + { + "desc":"The following table describes response header parameters:", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0068.html", + "doc_type":"api_swift", + "p_code":"66", + "code":"68" + }, + { + "desc":"Delete the goodbye object from the janeausten container:Delete the non-existing goodbye object from the janeausten container:", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0069.html", + "doc_type":"api_swift", + "p_code":"66", + "code":"69" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Show Object Metadata", + "uri":"obs_03_0070.html", + "doc_type":"api_swift", + "p_code":"53", + "code":"70" + }, + { + "desc":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.This operation does not involve a reques", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0071.html", + "doc_type":"api_swift", + "p_code":"70", + "code":"71" + }, + { + "desc":"The following table describes response header parameters:", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0072.html", + "doc_type":"api_swift", + "p_code":"70", + "code":"72" + }, + { + "desc":"Show metadata of the goodbye object in the marketwain container:", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0073.html", + "doc_type":"api_swift", + "p_code":"70", + "code":"73" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Create/Update/Delete Object Metadata", + "uri":"obs_03_0074.html", + "doc_type":"api_swift", + "p_code":"53", + "code":"74" + }, + { + "desc":"{account} indicates the name of an account.{container} indicates the name of a container.{object} indicates the name of an object.A POST request deletes all existing user", + "product_code":"obs", + "title":"Request", + "uri":"obs_03_0075.html", + "doc_type":"api_swift", + "p_code":"74", + "code":"75" + }, + { + "desc":"The following table describes response header parameters:", + "product_code":"obs", + "title":"Response", + "uri":"obs_03_0076.html", + "doc_type":"api_swift", + "p_code":"74", + "code":"76" + }, + { + "desc":"Create object metadata Author with the value set to other:Update object metadata Author with the value set to marktwain:Delete the metadata author, and leave the value bl", + "product_code":"obs", + "title":"Examples", + "uri":"obs_03_0077.html", + "doc_type":"api_swift", + "p_code":"74", + "code":"77" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Glossary", + "uri":"obs_03_0078.html", + "doc_type":"api_swift", + "p_code":"", + "code":"78" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Acronyms and Abbreviations", + "uri":"obs_03_0079.html", + "doc_type":"api_swift", + "p_code":"", + "code":"79" + }, + { + "desc":"Released OnWhat's New2021-12-10This is the second official release.This issue incorporates the following change:Optimized some descriptions.2018-03-15This is the first of", + "product_code":"obs", + "title":"Change History", + "uri":"obs_03_0080.html", + "doc_type":"api_swift", + "p_code":"", + "code":"80" + } +] \ No newline at end of file diff --git a/docs/obs/api-swift/PARAMETERS.txt b/docs/obs/api-swift/PARAMETERS.txt new file mode 100644 index 000000000..6da8d5f07 --- /dev/null +++ b/docs/obs/api-swift/PARAMETERS.txt @@ -0,0 +1,3 @@ +version="" +language="en-us" +type="" \ No newline at end of file diff --git a/docs/obs/api-swift/en-us_image_0138437473.png b/docs/obs/api-swift/en-us_image_0138437473.png new file mode 100644 index 000000000..ed7375a49 Binary files /dev/null and b/docs/obs/api-swift/en-us_image_0138437473.png differ diff --git a/docs/obs/api-swift/en-us_image_0138437574.png b/docs/obs/api-swift/en-us_image_0138437574.png new file mode 100644 index 000000000..e190bf5b4 Binary files /dev/null and b/docs/obs/api-swift/en-us_image_0138437574.png differ diff --git a/docs/obs/api-swift/en-us_image_0138437619.png b/docs/obs/api-swift/en-us_image_0138437619.png new file mode 100644 index 000000000..01dc7063b Binary files /dev/null and b/docs/obs/api-swift/en-us_image_0138437619.png differ diff --git a/docs/obs/api-swift/en-us_image_0138437668.png b/docs/obs/api-swift/en-us_image_0138437668.png new file mode 100644 index 000000000..1443e662a Binary files /dev/null and b/docs/obs/api-swift/en-us_image_0138437668.png differ diff --git a/docs/obs/api-swift/en-us_image_0138437827.png b/docs/obs/api-swift/en-us_image_0138437827.png new file mode 100644 index 000000000..c84b22108 Binary files /dev/null and b/docs/obs/api-swift/en-us_image_0138437827.png differ diff --git a/docs/obs/api-swift/obs_03_0001.html b/docs/obs/api-swift/obs_03_0001.html new file mode 100644 index 000000000..7d1847191 --- /dev/null +++ b/docs/obs/api-swift/obs_03_0001.html @@ -0,0 +1,18 @@ + + +
This chapter describes the functions and REST application programming interfaces (APIs) supported by Object Storage Service (OBS), which is compatible with OpenStack Swift.
+OBS (compatible with OpenStack Swift) is provided based on simple web service APIs. OBS helps construct storage-based Internet applications such as web hosting as well as online video, photo albums, and backup applications. OBS (compatible with OpenStack Swift) provides REST APIs, allowing users to easily access OBS through web applications.
+REST APIs support standard HTTP headers and status codes. IAM is used to manage online authentication for access security.
+APIs provided by OBS (compatible with OpenStack Swift) comply with REST specifications (HTTP 1.1). With REST APIs from OBS (compatible with OpenStack Swift), users can send standard HTTP requests to perform operations such as creating, querying, and deleting containers or objects. Users can use any tool that supports REST requests to send requests to OBS (compatible with OpenStack Swift).
+REST APIs provided by OBS (compatible with OpenStack Swift) are compatible with most OpenStack Swift APIs. Table 1 describes the compatibility between REST APIs provided by OBS (compatible with OpenStack Swift) and OpenStack Swift APIs (Version v1.0, Kilo).
+ +OpenStack Swift API + |
+Function + |
+Implemented by OBS (Compatible with OpenStack Swift) + |
+Differences + |
+
|---|---|---|---|
GET Account + |
+Obtains account information and the container list. + |
+Yes + |
+None + |
+
POST Account + |
+Creates, updates, or deletes account metadata. + |
+Yes + |
+None + |
+
HEAD Account + |
+Obtains account metadata. + |
+Yes + |
+None + |
+
GET Container + |
+Obtains container information and the object list. + |
+Yes + |
+None + |
+
PUT Container + |
+Creates a container. + |
+Yes + |
+None + |
+
DELETE Container + |
+Deletes an empty container. + |
+Yes + |
+None + |
+
POST Container + |
+Creates, updates, or deletes container metadata. + |
+Yes + |
+None + |
+
HEAD Container + |
+Obtains container metadata. + |
+Yes + |
+None + |
+
BULK DELETE Container + |
+Batch deletes containers. + |
+Yes + |
+In a response, the Content-Type header contains charset information. + |
+
POST Container Static WebSite + |
+Configures container static websites. + |
+Yes + |
+None + |
+
POST Container Cross domain policy + |
+Configures container cross-domain access policies. + |
+Yes + |
+None + |
+
POST container to container Synchronization + |
+Configures container synchronization. + |
+No + |
+This function is not supported. + |
+
POST Container Quota + |
+Configures the bucket quota. + |
+No + |
+This function is not supported. + |
+
GET Object + |
+Obtains an object's content and metadata. + |
+Yes + |
+None + |
+
PUT Object + |
+Creates or replaces an object. + |
+Yes + |
+None + |
+
COPY Object + |
+Copies an object. + |
+Yes + |
+None + |
+
DELETE Object + |
+Deletes an object. + |
+Yes + |
+None + |
+
HEAD Object + |
+Obtains object metadata. + |
+Yes + |
+None + |
+
POST Object + |
+Creates or updates object metadata. + |
+Yes + |
+None + |
+
Object Version + |
+Supports operations corresponding to object versioning. + |
+No + |
+Object versioning is not supported. + |
+
GET Large Object + |
+Gets large objects. + |
+Yes + |
+None + |
+
PUT Archive Auto Extraction + |
+Automatically decompresses uploaded objects. + |
+No + |
+This function is not supported. + |
+
PUT Large Object + |
+Puts large objects. + |
+Yes + |
+Static large objects can have a maximum of 1,000 parts. + |
+
COPY Large Object + |
+Copies large objects. + |
+Yes + |
+None + |
+
BULK DELETE Object + |
+Batch deletes objects. + |
+Yes + |
+None + |
+
Delete Large Object + |
+Deletes large objects. + |
+Yes + |
+None + |
+
Expiring Object Support + |
+Deletes objects as scheduled. + |
+No + |
+This function is not supported. + |
+
Object TempURL + |
+Performs object TempURL operations. + |
+Yes + |
+When outgoing_allow_head is set in TempURL, the content of the Content-Type header cannot be removed. + |
+
Storage Policy + |
+Configures storage policies. + |
+No + |
+OpenStack Swift's storage policy configuration is not supported. None of the APIs allow the X-Newest header to be carried. + |
+
Rate limiting + |
+Allows a configuration file to limit the rate. + |
+No + |
+A configuration file is not allowed to limit the rate. + |
+
Erasure Code Support + |
+Supports the Erasure Code algorithm at the underlying layer. + |
+No + |
+This function is not supported. + |
+
TempAuth + |
+Supports simple authentication provided by OpenStack Swift. + |
+No + |
+Only IAM is supported. + |
+
The REST specifications of OBS (compatible with OpenStack Swift) are compatible with most specifications of OpenStack Swift. Table 2 describes the differences between the REST specifications of OBS (compatible with OpenStack Swift) and the OpenStack Swift specifications.
+ +Item + |
+OpenStack Swift + |
+REST Specifications of OBS (Compatible with OpenStack Swift) + |
+
|---|---|---|
Maximum number of containers under an account + |
+None + |
+100 + |
+
Maximum number of objects under a container + |
+None + |
+50 million + |
+
After a success message is returned in response to a client's write or deletion request, the client can obtain the latest data. If the client that initiated a write request times out while waiting for a response, or the server returns HTTP response status code 500 or 503, the subsequent read operations may fail. If such an error occurs, check whether the data was successfully uploaded to the server. If the data was not uploaded successfully, upload it again.
+If multiple clients simultaneously upload, query, or delete the same object or container, these operations may reach the system at different points in time and experience different internal processing latency periods, and different results may be returned. For example, if multiple clients simultaneously upload the same object, the latest upload request received by the system will replace the previous one. If you want to prevent an object from being accessed in parallel, you must use a lock mechanism in upper-layer applications.
+1. When client 1 is uploading an object v1, client 2 is uploading an object v2 with the same name. After the successful uploads, both client 1 and client 2 can access the latest object data v2, as shown in Figure 1.
+ +2. When client 1 is uploading an object v1 and object metadata is not written yet, client 2 deletes an object with the same name. In this scenario, the upload operation of client 1 is still successful, and both client 1 and client 2 can access data object v1, as shown in Figure 2.
+ +3. When client 1 has successfully uploaded an object v1 and object metadata is still being written, client 2 deletes an object with the same name. In this scenario, the upload operation of client 1 is still successful. However, when client 1 and client 2 attempt to download Object1, they may be able to access data object v1, or an error may be returned indicating that the object does not exist, as shown in Figure 3.
+ +4. When client 1 is downloading an object, client 2 deletes an object with the same name. In this scenario, client 1 may have downloaded a full copy or only part of the object data. After a deletion success message is returned to client2, an attempt to download the object will fail, and an error will be returned indicating that the object does not exist, as shown in Figure 4.
+ +5. When client 1 is downloading an object, client 2 is updating an object with the same name. In this scenario, client 1 may have downloaded a full copy or only part of the object data. After an update success message is returned to client 2, an attempt to download the object will succeed, and the latest data will be returned, as shown in Figure 5.
+ +OBS (compatible with OpenStack Swift) updates the same metadata when processing concurrent PUT or DELETE operations on objects in a container. Performance of these operations is compromised due to metadata conflicts. For concurrent GET operations on objects in a container, however, performance is not compromised. For concurrent PUT or DELETE object operations on a container, OBS (compatible with OpenStack Swift) supports 15 Transactions Per Second (TPS). However, the performance of PUT an object is constrained by the TPS only when the object size is small. When the object size is relatively large, container performance has nothing to do with the TPS because PUT operations in this case mainly process object data and seldom update metadata. In general, container performance is inversely proportional to the object size in PUT operations. When tested, if the average size of concurrently uploaded objects exceeded 10 MB, the impact of concurrent metadata updates on operation performance could be ignored. For DELETE operations on objects, the performance of the container is constrained regardless of object sizes.
+
The PUT, DELETE, and GET operations referred to here refer to those performed on different objects in a container. If concurrent operations are performed on the same object, container performance is determined by processing capabilities of one or several specific disks.
+In typical application scenarios, such as archive and backup, there are a large number of concurrent PUT operations. To tune container performance, particularly in scenarios with small objects, the following methods are recommended:
+Upload backup data to different containers in OBS (compatible with OpenStack Swift) to eliminate data hotspots caused by concurrent PUT operations on the same container. As independent logical entities in OBS (compatible with OpenStack Swift), containers maintain their own metadata. Therefore, performance of one container is not affected by concurrent operations performed on other containers. In addition, data uploaded to different containers can be logically separated, which improves data listing and query performance.
+The performance of a container does not necessarily increase with the concurrent processing capability of that container. In contrast, when the concurrent processing capability of a container is excessively high, the performance of that container may deteriorate because OBS (compatible with OpenStack Swift) is busy handling conflicts in concurrent operations. In OBS (compatible with OpenStack Swift), the recommended concurrency value for a container is 15. This value has been tested for concurrently uploading small objects to the same container. If the object size is large, you can increase this value based on the container's TPS to achieve optimal container performance.
+In scenarios with a large number of small objects, to improve container performance and storage space utilization, first compress the small objects into packages like .tar or .zip files.
+You can use random object names to reduce the impact of concurrency conflicts on a single node. For example, in a typical scenario of log archiving, the names of objects to be uploaded may be as follows:
+yourcontainer/obslog/20140610-01.log.tar.gz +yourcontainer/obslog/20140610-02.log.tar.gz +yourcontainer/obslog/20140610-03.log.tar.gz +yourcontainer/obslog/20140610-04.log.tar.gz +... +yourcontainer/obslog/20140611-01.log.tar.gz +yourcontainer/obslog/20140611-02.log.tar.gz +yourcontainer/obslog/20140611-03.log.tar.gz +yourcontainer/obslog/20140611-04.log.tar.gz+
The names of these objects have the same prefix. When being uploaded concurrently, these objects are likely to be routed to the same node. To eliminate data hotspots and improve container performance, add random prefixes to object names. For example, a 6-digit hexadecimal string can be added to each of the object names:
+yourcontainer/6ac3e2-obslog/20140610-01.log.tar.gz +yourcontainer/b425da-obslog/20140610-02.log.tar.gz +yourcontainer/17fe36obslog/20140610-03.log.tar.gz +yourcontainer/ac96b4-obslog/20140610-04.log.tar.gz +... +yourcontainer/95d36e-obslog/20140611-01.log.tar.gz +yourcontainer/45c2d-obslog/20140611-02.log.tar.gz +yourcontainer/ea2cfe-obslog/20140611-03.log.tar.gz +yourcontainer/ba36c2-obslog/20140611-04.log.tar.gz+
This method is only recommended when there are a lot of objects in a container.
+This chapter explains how to use the REST APIs to access and operate OBS (compatible with OpenStack Swift), including how to locate a resource and send and authenticate a request. This chapter also covers the HTTP response codes returned by OBS (compatible with OpenStack Swift).
+In REST, specific information or data on a network is represented by a resource, which is referenced with a uniform resource identifier (URI). Clients on a network can locate resources using uniform resource locators (URLs). In OBS (compatible with OpenStack Swift), a resource can be an account, container, object, or specific resource related to an account, container, or object. Such a resource is identified by a URL and can be operated after requests are sent using the URL.
+The common URL format is as follows (the content in brackets ([ ]) is optional):
+protocol ://hostname[:port] /v1/account[/container] [/object] [?param]
+Table 1 describes parameters in a URL.
+ +Parameter + |
+Description + |
+Required or Optional + |
+
|---|---|---|
protocol + |
+The protocol used for sending requests. Possible values include HTTP and HTTPS. +You can specify HTTPS to ensure secure access to resources. + |
+Required + |
+
hostname + |
+The host name, namely, the domain name or service IP address of OBS (compatible with OpenStack Swift). + |
+Required + |
+
port + |
+The port enabled for protocols used for sending requests. The value varies with software server deployment. In OBS (compatible with OpenStack Swift), the HTTP port is 80 and the HTTPS port is 443. If this parameter is not specified, the default port will be used. + |
+Optional + |
+
v1 + |
+The version used in the request. v1 indicates the object storage version. + |
+Required + |
+
account + |
+A user path. Each path identifies a unique user in the system. An account consists of a management prefix and a project ID, for example, AUTH_ProjectID. + |
+Required + |
+
container + |
+A container path. + |
+Optional + |
+
object + |
+An object path. + |
+Optional + |
+
param + |
+The specific resource. By default, it is the requested container or object itself. + |
+Optional + |
+
For security reasons, HTTP is not recommended. HTTPS should be used instead.
+In OBS (compatible with OpenStack Swift), HTTPS supports TLS 1.2 only.
+
If the version in a URL is set to V1 (the correct one is actually v1), OBS (compatible with OpenStack Swift) returns a 404 Not Found error code, whereas OpenStack Swift returns a 400 Bad Request error code.
+A request sent to OBS (compatible with OpenStack Swift) must comply with HTTP 1.1. In addition, the headers of a request must contain parameters defined in IAM, for example, the authentication fields.
+HTTP supports several HTTP request methods, such as GET, PUT, POST, DELETE, HEAD, and COPY. A request method indicates how to access specific resources. Table 1 describes the request methods supported by REST APIs that are provided by OBS (compatible with OpenStack Swift).
+ +Method + |
+Description + |
+
|---|---|
GET + |
+Requests the server to return a specific resource, such as a container or object list or downloaded objects. + |
+
PUT + |
+Requests the server store a specific resource, such as a newly created container or uploaded objects. + |
+
POST + |
+Requests the server to modify a specific resource, such as a container or object metadata. + |
+
DELETE + |
+Requests the server to delete a specific resource, for example, an object. + |
+
HEAD + |
+Requests the server to return the digest of a specific resource, for example, the object metadata. + |
+
COPY + |
+Requests the server to copy a specific resource, for example, an object. + |
+
When sending a REST request to OBS (compatible with OpenStack Swift), you need to add parameters in request headers. For details about request headers, see the descriptions of the specific operations.
+
When sending a REST request to OBS (compatible with OpenStack Swift), you must comply with the preceding HTTP request rules. If any upper limit is exceeded, the error response may be different from that defined by OpenStack Swift. The request rules for the original OpenStack Swift APIs do not strictly check requests based on the preceding rules, but require users to comply with the preceding standard HTTP request rules.
+When the parameter length (request headers and content) of a request exceeds the buffer size of the server, OBS (compatible with OpenStack Swift) returns a 413 Request Entity Too Large: head, whereas OpenStack Swift returns a 400 Bad Request.
+If a request contains a container name or an object name, OBS (compatible with OpenStack Swift) starts to process the request only after checking that the name conforms to the specified naming rules.
+Account names must be:
+
OBS (compatible with OpenStack Swift) uses the IDs of tenants created in the IAM system as account names.
+Container names must:
+
To ensure system security, in a container name, the types of characters that are prohibited by OBS (compatible with OpenStack Swift) are more than those prohibited by OpenStack Swift.
+A key specifies the name of an object, and each object in a container must have a unique object key. Object names must:
+The following rules apply to custom metadata of accounts, containers, and objects:
+
In OpenStack Swift, tab and space characters before and after the name of a custom metadata item are not deleted.
+Users of OBS (compatible with OpenStack Swift) must be authenticated using IAM. In a request sent by a client to OBS (compatible with OpenStack Swift), the request header must include the token ID obtained from the IAM service. This token ID is generated and encrypted by IAM based on the domain, project, and role information. In an OBS request, the X-Auth-Token is used to specify a token ID. For details about the usage, see the corresponding object operation method.
+OBS (compatible with OpenStack Swift) returns an HTTP response after receiving and processing a request.
+Status Line: HTTP-Version Status-Code Reason-Phrase +Response Headers +<Conditional Response Body>+
The first line of a response is the Status-Line, consisting of the protocol version, numeric status code, and textual phrases. The previous elements are separated by spaces. See Table 1.
+ +Element + |
+Description + |
+
|---|---|
HTTP-Version + |
+HTTP version. OBS (compatible with OpenStack Swift) uses HTTP 1.1. + |
+
Status-Code + |
+Status code, which describes the response type. + |
+
Reason-Phrase + |
+Reason phrase, which describes the status code in a short text. + |
+
The first digit of the status code defines the response type. The last two digits do not have this function. There are five types of status codes, categorized based on the first digit. The categories are described in Table 2.
+ +Status Code + |
+Description + |
+
|---|---|
1xx + |
+The server has received but is still processing the request. + |
+
2xx + |
+The request has been received, understood, and accepted. + |
+
3xx + |
+The client must take further actions to complete the request. + |
+
4xx + |
+There was an error on the client side. The request contains bad syntax or cannot be fulfilled. + |
+
5xx + |
+There was an error on the server side. The server failed to fulfill a valid request. + |
+
Status Code + |
+Description + |
+Returned After + |
+
|---|---|---|
100 Continue + |
+The initial part of the request has been received and has not yet been rejected by the server and the client should continue with its request. + |
+
|
+
Status Code + |
+Description + |
+Returned After + |
+
|---|---|---|
200 OK + |
+The server has received and accepted the client's request. + |
+
|
+
201 Created + |
+The response may contain an XML file. The XML file describes the response content. + |
+
|
+
202 Accepted + |
+The server has received the request. + |
+
|
+
204 No Content + |
+The server has processed a request successfully, but no content was returned. + |
+
|
+
Status Code + |
+Description + |
+Returned After + |
+
|---|---|---|
303 See Other + |
+The client can use another URL to get a specific object. + |
+POST operations (provided that redirection parameters in requests are valid.) + |
+
304 Not Modified + |
+After the client sent a GET request with the required modification time, access was allowed but the resource was not modified after the specified time. + |
+The resource is obtained but the modification time condition is not met. + |
+
307 Moved Temporarily + |
+A request has been redirected. + |
+A request is redirected after it fails to be processed by the server. + |
+
Status Code + |
+Description + |
+Returned After + |
+
|---|---|---|
400 Bad Request + |
+The syntax of a request was incorrect. + |
+A request in incorrect syntax or containing incorrect parameters is sent. + |
+
401 Unauthorized + |
+The request could not be authenticated. + |
+The user does not exist or the authentication information in a sent request is incorrect. + |
+
403 Forbidden + |
+The server refused the request. + |
+The user does not have sufficient permissions. + |
+
404 Not Found + |
+The requested resource does not exist. + |
+The requested resource (such as a container or object) does not exist. + |
+
411 Length Required + |
+The request header did not contain the required Content-Length or Transfer-Encoding field. + |
+A request containing no Content-Length header is sent. + |
+
412 Precondition Failed + |
+Conditions are not met. + |
+Conditions are not met, if the object query request contains the If-Match or If-None-Match header. + |
+
413 Request Entity Too Large + |
+Insufficient user quota. + |
+User storage capacity exceeds user quota when uploading or replicating objects. + |
+
Status Code + |
+Description + |
+Returned After + |
+
|---|---|---|
500 Internal Error + |
+An internal error occurred on the server. + |
+An internal error occurred on the server. + |
+
503 Service Unavailable + |
+The server was overloaded. + |
+The server is processing too many requests. + |
+
A response header is the information appended to a response, as described in Table 8. Response headers describe the server and contain further information about accessing the requested resource.
+ +Header + |
+Description + |
+Applicable To + |
+
|---|---|---|
Content-Length + |
+Length of a response body + |
+All responses (except those responses whose transfer-encoding is chunked) + |
+
Date + |
+The date and time when a response was generated + |
+All responses + |
+
X-Trans-Id + |
+A unique identifier generated by OBS (compatible with OpenStack Swift) for a request + |
+All responses + |
+
Content-Type + |
+The object type returned + |
+All responses + |
+
OBS (compatible with OpenStack Swift) normalizes the content of the Content-Type. The content returned is different from that returned by OpenStack Swift in the following way:
+In OBS (compatible with OpenStack Swift), a response body is included in a request response under the following conditions:
+If the object is not blank, the response body is the object body.
+The response body describes the client error in detail in XML format so that the user can perform further operations. For details, see client error response codes.
+The response body describes the server error in detail in XML format so that the user can perform further operations.
+OBS (compatible with OpenStack Swift) returns an error response if a request is incorrect, the permission is incorrect, or the requested container or object is not found. An error response describes the error. When you upload an object, if permissions cannot be authenticated, the following information (in HTML format) is displayed:
+<html><h1>Unauthorized</h1><p>This server could not verify that you are authorized to access the document you requested.</p></html>+
This chapter describes error responses returned by OBS (compatible with OpenStack Swift), including all error codes and error response syntax.
+If OBS (compatible with OpenStack Swift) encounters an error when processing a request, a response containing the error code and error description is returned. Table 1 describes all error codes in OBS (compatible with OpenStack Swift).
+ +Error Code + |
+Description + |
+HTTP Status Code + |
+
|---|---|---|
Moved Permanently + |
+The requested resource must be addressed using a specified node. Send all future requests to the node. + |
+301 Moved Permanently + |
+
Not Modified + |
+The requested resource has not changed (since the last access or based on the conditions specified in the request). + |
+304 Not Modified + |
+
Bad Request + |
+The syntax of a request was incorrect. + |
+400 Bad Request + |
+
Unauthorized + |
+Unauthorized. The authentication failed or the token is invalid. + |
+401Unauthorized + |
+
Forbidden + |
+The access was denied. + |
+403 Forbidden + |
+
Not Found + |
+The requested resource does not exist. + |
+404 Not Found + |
+
Method Not Allowed + |
+The specified method is not allowed on the requested resource. + |
+405 Method Not Allowed + |
+
Not Acceptable + |
+Not acceptable. The request may contain invalid parameters or headers. + |
+406 Not Acceptable + |
+
Conflict + |
+This operation caused a conflict. For example, a non-empty container is deleted. + |
+409 Conflict + |
+
Missing Content Length + |
+HTTP headers must contain the Content-Length field. + |
+411 Length Required + |
+
Precondition Failed + |
+At least one specified precondition has not been met. + |
+412 Precondition Failed + |
+
Request Entity Too Large + |
+The amount of data to be uploaded has exceeded what is supported. + |
+413 Request Entity Too Large + |
+
Invalid Range + |
+The requested range cannot be obtained. + |
+416 Client Requested Range Not Satisfiable + |
+
Unprocessable Entity + |
+The request format is correct but contains incorrect syntax, making it unprocessable. + |
+422 Unprocessable Entity + |
+
Internal Error + |
+Internal error. Please retry. + |
+500 Internal Server Error + |
+
Service Unavailable + |
+The service is unavailable. + |
+503 Service Unavailable + |
+
When an error occurs, the header information contains:
+Content-Type: application/*, which may be in HTML or text format
+HTTP status code 3xx, 4xx, or 5xx. For details, see Table 1.
+The response body also contains information about the error. The following is an example of an error response body in an authentication failure.
+<html><h1>Unauthorized</h1><p>This server could not verify that you are authorized to access the document you requested.</p></html>+
The requests that are sent by users to OBS (compatible with OpenStack Swift) must comply with REST specifications and contain required header parameters. If a request is successfully processed, OBS (compatible with OpenStack Swift) returns a success response. If the request cannot be processed, OBS (compatible with OpenStack Swift) returns a message that contains the cause of the error. This chapter describes REST operations for accounts with IAM authentication.
+This operation obtains account metadata and the list of containers in the account.
+In the container list, container names are sorted in ascending order based on ASCII code.
+
OBS (compatible with OpenStack Swift) employs a mechanism that automatically deletes accounts and their data in the background. There is no account deletion status corresponding to OpenStack Swift.
+The specific differences are as follows:
+Account metadata does not include the X-Account-Status.
+Showing account details does not involve the 410 Gone return code.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
GET + |
+/v1/{account}{?limit,marker,end_marker,format,prefix,delimiter} + |
+Shows details of a specified account and lists the containers, sorted by name in ascending order, in the account. + |
+
{account} indicates the name of an account.
+This operation does not involve a request body.
+Show account details and list containers, and ask for a JSON response:
+curl -i $publicURL?format=json -X GET -H "X-Auth-Token:$token"+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
Request header parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
Accept + |
+String +(Optional) + |
+Similar to the format query parameter, set this header to application/json, application/xml, or text/xml. + |
+
If the value of Accept is invalid, OBS (compatible with OpenStack Swift) returns the 406 (Not Acceptable) error code. Then, OpenStack Swift will process the request based on the default value of Accept.
+Parameter + |
+Type + |
+Description + |
+
|---|---|---|
limit + |
+Int +(Optional) + |
+Limits the number of containers in a query result. +Value range: 0 to 10000 +Default value: 10000 +If this parameter is set to a value larger than 10000, an error is reported. + |
+
marker + |
+String +(Optional) + |
+Returns container names that are greater than the specified marker. + |
+
end_marker + |
+String +(Optional) + |
+Returns container names that are smaller than the specified marker. + |
+
format + |
+String +(Optional) + |
+Sets the format of the returned container list. The valid values are plain (default), json, and xml. Its function is the same as Accept. + |
+
prefix + |
+String +(Optional) + |
+Returns containers that have the specified prefix. + |
+
delimiter + |
+Char +(Optional) + |
+Returns the container names that are nested in the account. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
Accept-Ranges + |
+String +(Required) + |
+Type of ranges that the object accepts. + |
+
X-Account-Bytes-Used + |
+Int +(Required) + |
+Total number of bytes that are stored in OBS for the account. + |
+
X-Account-Container-Count + |
+Int +(Required) + |
+Number of containers in the account. + |
+
X-Account-Object-Count + |
+Int +(Required) + |
+Number of objects in the account. + |
+
X-Account-Meta-name + |
+String +(Optional) + |
+Custom account metadata item, where {name} is the name of the metadata item. + |
+
X-Account-Meta-Quota-Bytes + |
+Int +(Optional) + |
+Quota of the account. + |
+
X-Account-Meta-Temp-URL-Key + |
+String +(Optional) + |
+Secret key value for TempURL. + |
+
X-Account-Meta-Temp-URL-Key-2 + |
+String +(Optional) + |
+A second secret key value for TempURL. + |
+
X-Account-Project-Domain-Id + |
+String +(Required) + |
+ID of the domain to which the account belongs. + |
+
Content-Length + |
+String +(Required) + |
+If the operation succeeds, the value is the length of the container list information. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+Type of the text in the response body. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
X-Timestamp + |
+Datetime +(Required) + |
+Object creation time and date, in UNIX Epoch timestamp format. + |
+
If the response format is json or xml, container details are shown. The following table describes the response body parameters:
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+Name of the container. + |
+
count + |
+Int + |
+Number of objects in the container. + |
+
bytes + |
+Int + |
+Total number of bytes that are stored in OBS for objects. + |
+
For performance purposes, of the response headers, OBS (compatible with OpenStack Swift) does not update X-Account-Bytes-Used, X-Account-Container-Count, and X-Account-Object-Count in real time.
+Show account details and list containers. Do not set a query parameter. Use the default plain response format.
+curl -i -H "X-auth-token:b8b574e33b0a4f74a1961bed1b4784b8" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9" -X GET+
HTTP/1.1 200 OK +X-Trans-Id: tx19cbb9377b2eb8a164ac8-c40e979e9b +Accept-Ranges: bytes +Content-Type: text/plain;charset=UTF-8 +Date: Wed, 16 Sep 2015 07:10:18 GMT +X-Account-Bytes-Used: 0 +X-Account-Container-Count: 3 +X-Account-Object-Count: 0 +X-Account-Project-Domain-Id: default +X-Timestamp: 1442371465.946 +Content-Length: 23 + +[23 Byte data content]+
Show account details and list containers. Use the prefix=abc query parameter, and set the response format to xml.
+curl -i -H "X-auth-token:b8b574e33b0a4f74a1961bed1b4784b8" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9?format=xml&prefix=abc" -X GET+
HTTP/1.1 200 OK +X-Trans-Id: tx200c074b35f50910061e7-067ab2f1d4 +Accept-Ranges: bytes +Content-Type: application/xml;charset=UTF-8 +Date: Wed, 16 Sep 2015 07:12:09 GMT +X-Account-Bytes-Used: 0 +X-Account-Container-Count: 3 +X-Account-Object-Count: 0 +X-Account-Project-Domain-Id: default +X-timestamp: 1442371465.946 +Content-Length: 256 + +<?xml version="1.0" encoding="UTF-8"?> +<account name="AUTH_0ce042a9be6140769b12c1001d41bcf9"> +<container><name>abcc122</name><count>0</count><bytes>0</bytes></container> +<container><name>abcd123</name><count>0</count><bytes>0</bytes></container> +</account>+
Users can send requests to create, update, or delete account metadata.
+For details about metadata rules, see Naming Rules.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
POST + |
+/v1/{account} + |
+Creates, updates, or deletes account metadata. + |
+
{account} indicates the name of an account.
+Metadata creation or update depends on whether the specified metadata already exists. Existing metadata is updated, and missing metadata is created.
+This operation does not involve a request body.
+Create or update metadata:
+curl -i $publicURL -X POST -H "X-Auth-Token:$token" -H "X-Account-Meta-name:value"+
Delete metadata:
+curl -i $publicURL -X POST -H "X-Auth-Token:$token" -H "X-Remove-Account-Meta-name:value"+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
bulk-delete + |
+String +(Optional) + |
+Bulk-deletes containers. This parameter is used with the deletion list file. +A maximum of 10,000 empty containers can be deleted at once. + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
Request header parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
X-Account-Meta-Temp-URL-Key + |
+String +(Optional) + |
+Secret key value for TempURL. + |
+
X-Account-Meta-Temp-URL-Key-2 + |
+String +(Optional) + |
+A second secret key value for TempURL. + |
+
X-Account-Meta-name + |
+String +(Optional) + |
+Account metadata. {name} is the name of a metadata item that you want to add, update, or delete. To delete this item, leave {name} empty in this header. You must specify an X-Account-Meta-{name} header for each metadata item (for each {name}) that you want to add, update, or delete. + |
+
X-Remove-Account-Meta-name + |
+String +(Optional) + |
+Deletes metadata. If a tool does not support empty headers, such as an earlier version of cURL, send this header to delete metadata. {name} indicates the metadata to delete. Set {name} to a non-empty value. + |
+
X-Account-Meta-Quota-Bytes + |
+Int +(Optional) + |
+Configures the tenant quota. The value ranges from 0 to 9223372036854775807. After setting the quota, the quota will be checked each time you upload or copy an object, or modify the metadata of an object or bucket. If a quota check fails, a status code 413 is returned. + |
+
X-Remove-Account-Meta-Quota-Bytes + |
+String +(Optional) + |
+Deletes the quota. This parameter can be set to any non-empty value. If you delete a quota without setting it first, status code 403 is returned. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the text in the response body. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
Create Book and Subject metadata:
+curl -i -H "X-auth-token:b8b574e33b0a4f74a1961bed1b4784b8" "http://172.28.5.31:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9" -X POST -H "X-Account-Meta-Book:MobyDick" -H "X-Account-Meta-Subject:Literature"+
HTTP/1.1 204 No Content +X-Trans-Id: tx000001513971bc1a370c0-93967ab85f +Content-Length: 0 +Content-Type: text/html;charset=UTF-8 +Date: Tue, 24 Nov 2015 12:22:13 GMT+
Update the Subject metadata:
+curl -i -H "X-auth-token:b8b574e33b0a4f74a1961bed1b4784b8" "http://172.28.5.31:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9" -X POST -H "X-Account-Meta-Subject:ChineseLiterature"+
HTTP/1.1 204 No Content +X-Trans-Id: tx0000015139725538370c0-f6e0c56435 +Content-Length: 0 +Content-Type: text/html;charset=UTF-8 +Date: Tue, 24 Nov 2015 12:22:53 GMT+
Delete the Subject metadata:
+curl -i -H "X-auth-token:b8b574e33b0a4f74a1961bed1b4784b8" "http://172.28.5.31:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9" -X POST -H "X-Remove-Account-Meta-Subject:d"+
HTTP/1.1 204 No Content +X-Trans-Id: tx000001513972ce7c370c0-40b77d13e2 +Content-Length: 0 +Content-Type: text/html;charset=UTF-8 +Date: Tue, 24 Nov 2015 12:23:24 GMT+
Users can send requests to obtain account metadata. This operation is similar to a function described in Show Account Details and List Containers. Only account details are shown. Containers are not listed.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
HEAD + |
+/v1/{account} + |
+Shows metadata of a specified account. + |
+
{account} indicates the name of an account. Metadata of an account includes the number of containers, number of objects, and total number of bytes that are stored in OBS for the account.
+This operation does not involve a request body.
+curl -i $publicURL -X HEAD -H "X-Auth-Token:$token"+
This operation does not include request query parameters.
+Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
Request header parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
The following table describes the response headers:
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
Accept-Ranges + |
+String +(Required) + |
+Acceptable range type, for example, bytes. + |
+
X-Account-Bytes-Used + |
+Int +(Required) + |
+Total number of bytes that are stored in OBS for the account. + |
+
X-Account-Container-Count + |
+Int +(Required) + |
+Number of containers in the account. + |
+
X-Account-Object-Count + |
+Int +(Required) + |
+Number of objects in the account. + |
+
X-Account-Meta-name + |
+String +(Optional) + |
+Custom account metadata item, where {name} is the name of the metadata item. + |
+
X-Account-Meta-Quota-Bytes + |
+Int +(Optional) + |
+Quota of the account. + |
+
X-Account-Meta-Temp-URL-Key + |
+String +(Optional) + |
+Secret key value for TempURL. + |
+
X-Account-Meta-Temp-URL-Key-2 + |
+String +(Optional) + |
+A second secret key value for TempURL. + |
+
X-Account-Project-Domain-Id + |
+String +(Required) + |
+ID of the domain to which the account belongs. + |
+
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the text in the response body. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
X-Timestamp + |
+Datetime +(Required) + |
+Object creation time and date, in UNIX Epoch timestamp format. + |
+
Show account metadata.
+curl -i -H "X-Auth-token:9d6c288edff8434ea23108e6516ae5a5" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9" -X HEAD+
HTTP/1.1 204 No Content +X-Trans-Id: tx000001513970d65e370c0-0480bf0ace +Accept-Ranges: bytes +Content-Length: 0 +Content-Type: text/plain;charset=UTF-8 +Date: Tue, 24 Nov 2015 12:21:14 GMT +X-Account-Bytes-Used: 0 +X-Account-Container-Count: 0 +X-Account-Meta-Book: firstbook +X-Account-Object-Count: 0 +X-Account-Project-Domain-Id: default +X-Timestamp: 1448367617.422+
The requests that are sent by users to OBS must comply with REST specifications and contain required header parameters. If a request is successfully processed, OBS (compatible with OpenStack Swift) returns a success response. If the request cannot be processed, OBS (compatible with OpenStack Swift) returns a message that contains the cause of the error. This chapter describes REST operations on containers. Authentication is implemented based on IAM.
+This operation obtains container metadata and the list of objects in the container.
+In an object list, objects are sorted by name in ascending order based on the comparison of binary memcmp() functions.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
GET + |
+/v1/{account}/{container}{?limit,marker,end_marker,prefix,format,delimiter,path} + |
+Shows metadata of a specified container and lists objects, sorted by name in ascending order, in the container. + |
+
{account} indicates the name of an account.
+{container} indicates the name of a container.
+This operation does not involve a request body.
+Show container details for and list objects in the marktwain container, and ask for a JSON response:
+curl -i $publicURL/marktwain?format=json -X GET -H "X-Auth-Token:$token"+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
Request header parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
Accept + |
+String +(Optional) + |
+Similar to the format query parameter, set this header to application/json, application/xml, or text/xml. + |
+
Table 2 describes the query parameters of "Show Container Details and List Objects".
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
limit + |
+Int +(Optional) + |
+Limits the number of objects in a query result. +Value range: 0 to 10000 +Default value: 10000 +If this parameter is set to a value larger than 10000, an error is reported. + |
+
marker + |
+String +(Optional) + |
+Returns object names that are greater than the specified marker. + |
+
end_marker + |
+String +(Optional) + |
+Returns object names that are smaller than the specified marker. + |
+
format + |
+String +(Optional) + |
+Sets the format of the returned object list. The valid values are plain (default), json, and xml. Its function is the same as Accept. + |
+
prefix + |
+String +(Optional) + |
+Returns objects that have the specified prefix. + |
+
delimiter + |
+Char +(Optional) + |
+Returns the object names that are nested in the container. + |
+
path + |
+String +(Optional) + |
+Returns the object names that are nested in the specified path. Equivalent to setting delimiter to / and prefix to the path with a slash (/) at the end. + |
+
There are two issues with OpenStack Swift that OBS (compatible with OpenStack Swift) does not have:
+For example, if bucket01 contains object obj0, and the delimiter=o parameter is used in a query, OBS (compatible with OpenStack Swift) returns result o. OpenStack Swift, however, returns obj0 which is incorrect.
+Given the same configuration for OBS (compatible with OpenStack Swift) and OpenStack Swift, suppose a container includes objects o/1, o/2, and o/subdir1/1. When the request (with path=o used) is sent to OpenStack Swift, o/subdir1/1 would not be found.
+ +Requested Party + |
+Returned Result + |
+
|---|---|
OpenStack Swift + |
+o/1 +o/2 + |
+
OBS + |
+o/1 +o/2 +o/subdir1/1 + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
Accept-Ranges + |
+String +(Required) + |
+Type of ranges that the object accepts. + |
+
X-Container-Bytes-Used + |
+Int +(Required) + |
+Total number of bytes that are stored in OBS for the container. + |
+
X-Container-Object-Count + |
+Int +(Required) + |
+Number of objects in the container. + |
+
X-Container-Meta-name + |
+String +(Optional) + |
+Custom container metadata item, where {name} is the name of the metadata item. + |
+
Content-Length + |
+String +(Required) + |
+If the operation succeeds, the value is the length of the object list information. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the text in the response body. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + |
+
X-Timestamp + |
+Datetime +(Required) + |
+The time when the container was created. +The format is a UNIX Epoch timestamp. + |
+
If the response format is json or xml, object details are shown. Table 1 describes the response body parameters:
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+An object name. + |
+
hash + |
+String + |
+MD5 checksum value of the object content. + |
+
bytes + |
+Int + |
+Total number of bytes that are stored in OBS for the object. + |
+
content_type + |
+String + |
+Content type of the object. + |
+
last_modified + |
+Datetime + |
+Date and time when the object was last modified. + |
+
Show metadata of the testcontainer container and list objects. Do not set a query parameter. Use the default plain response format.
+curl -i http://172.28.54.10:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/testcontainer -H "x-auth-token:c1f21a34cce442efbd4957018263cc2c" -X GET+
HTTP/1.1 200 OK +X-Trans-Id: tx0000015133a73737370a1-35e31d5be7 +Accept-Ranges: bytes +Content-Length: 10 +Content-Type: text/plain;charset=UTF-8 +Date: Mon, 23 Nov 2015 09:22:58 GMT +X-Container-Bytes-Used: 5027 +X-Container-Object-Count: 2 +X-Timestamp: 1448270495.79460 + +[10 Byte data content]+
Show metadata of the testcontainer container and list objects. Specify the JSON response format.
+curl -i http://172.28.54.10:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/testcontainer?format=json -H "x-auth-token:c1f21a34cce442efbd4957018263cc2c" -X GET+
A JSON response is returned. The response body contains object information such as hash, bytes, and content_type.
+HTTP/1.1 200 OK
+X-Trans-Id: tx0000015133aa2422370a1-13b8629ff1
+Accept-Ranges: bytes
+Content-Length: 335
+Content-Type: application/json;charset=UTF-8
+Date: Mon, 23 Nov 2015 09:26:09 GMT
+X-Container-Bytes-Used: 5027
+X-Container-Object-Count: 2
+X-Timestamp: 1448270495.79460
+
+[
+ {
+ "hash": "0481164fe6931fb86ca4d8e8b3689efb",
+ "bytes": 4337,
+ "content_type": "application/octet-stream",
+ "last_modified": "2015-11-23T09:22:22.859650",
+ "name": "jack"
+ },
+ {
+ "hash": "1e5d213baf0069e26805f5d4efc900fe",
+ "bytes": 690,
+ "content_type": "application/octet-stream",
+ "last_modified": "2015-11-23T09:22:44.748920",
+ "name": "rose"
+ }
+]
+This operation creates a container under a specified account. Every container within a given account must have a unique name, but containers can have the same name as long as they are under different accounts.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
PUT + |
+/v1/{account}/{container} + |
+Creates a container in a specified account. + |
+
{account} indicates the name of an account.
+{container} indicates the name of a container.
+This operation does not involve a request body.
+Create a container named marktwain:
+curl -i $publicURL/marktwain -X PUT -H "X-Auth-Token:$token"+
This operation does not include request query parameters.
+Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
Table 2 describes the request header parameters.
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
X-Container-Read + |
+String +(Optional) + |
+Sets a container access control list (ACL) that grants read access. +To set the container read ACL: +curl -X {PUT|POST} -i -H "X-Auth-Token: $token" -H \ +"X-Container-Read: ACL" $publicURL/Container +For details about ACL format rules, see the next section. + |
+
X-Container-Write + |
+String +(Optional) + |
+Sets a container ACL that grants write access. +To set the container write ACL: +curl -X {PUT|POST} -i -H "X-Auth-Token: $token" -H \ +"X-Container-Write: ACL" $publicURL/Container +For details about ACL format rules, see the next section. + |
+
X-Container-Meta-name + |
+String +(Optional) + |
+Container metadata. {name} is the name of a metadata item that you want to add, update, or delete. To delete this item, leave {name} empty in this header. You must specify an X-Container-Meta-{name} header for each metadata item (for each {name}) that you want to add, update, or delete. + |
+
Container read ACL rules are as follows:
+Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+Length of a response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
The request does not include response body parameters.
+All the error responses are contained in Table 1.
+Create a container named marktwain:
+curl -i -H "X-Auth-token:caf12eeaae6b45b1afcb7ad1d6588a4f" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9/marktwain" -X PUT+
HTTP/1.1 201 Created +X-Trans-Id: tx568a5d33add18d5f73757-b6dc185e91 +Content-Type: text/html;charset=UTF-8 +Date: Fri, 18 Sep 2015 01:58:51 GMT +Content-Length: 0+
Container marktwain exists. Create it again.
+curl -i -H "X-Auth-token:caf12eeaae6b45b1afcb7ad1d6588a4f" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9/marktwain" -X PUT+
HTTP/1.1 202 Accepted +X-Trans-Id: txed4fe8ffb3219cd0db230-cbe125775d +Content-Type: text/html;charset=UTF-8 +Date: Fri, 18 Sep 2015 01:59:01 GMT +Content-Length: 76 +<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>+
Create a container and specify the X-Container-Read metadata.
+curl -i http://172.28.54.10:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/ruanman -H"x-auth-token:c1f21a34cce442efbd4957018263cc2c" -H"x-container-read:.r:*" -X PUT+
HTTP/1.1 201 Created +X-Trans-Id: tx000001513752eba4370a5-4f8cd5e885 +Content-Length: 0 +Content-Type: text/html;charset=UTF-8 +Date: Tue, 24 Nov 2015 02:29:24 GMT+
This operation deletes a container from a specified account.
+Only empty containers can be deleted.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
DELETE + |
+/v1/{account}/{container} + |
+Deletes a container in a specified account. Only empty containers can be deleted. + |
+
{account} indicates the name of an account. {container} indicates the name of a container.
+This operation does not involve a request body.
+Delete the empty containers from the specified account:
+curl -i $publicURL/steven -X DELETE -H "X-Auth-Token:$token"+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
bulk-delete + |
+String +(Optional) + |
+Bulk-deletes objects. This parameter is used with the deletion list file. +A maximum of 10,000 objects can be deleted at once. + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
Request header parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
Delete an empty steven container:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u/steven -X DELETE+
HTTP/1.1 204 No Content +X-Trans-Id: tx3d3e55d11af10dd917cdd-b205cb56e6 +Content-Length: 0 +Content-Type: text/html;charset=UTF-8 +Date: Sat, 19 Sep 2015 02:37:34 GMT+
Delete the non-existing steve container:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u/steve -X DELETE+
HTTP/1.1 404 Not Found +X-Trans-Id: txbfb5fe049899729a00e6d-e304231475 +Content-Type: text/html;charset=UTF-8 +Date: Sat, 19 Sep 2015 02:37:04 GMT +Content-Length: 70 + +<html><h1>Not Found</h1><p>The resource could not be found.</p></html>+
Delete the non-empty CONTAINER container:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u/CONTAINER -X DELETE+
HTTP/1.1 409 Conflict +X-Trans-Id: tx920280c22ff4ec5f733a5-74a61c1cb9 +Content-Type: text/html;charset=UTF-8 +Date: Sat, 19 Sep 2015 02:33:28 GMT +Content-Length: 95 + +<html><h1>Conflict</h1><p>There was a conflict when trying to complete your request.</p></html>+
Users can send requests to create, update, or delete container metadata.
+For details about metadata rules, see Naming Rules.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
POST + |
+/v1/{account}/{container} + |
+Creates, updates, or deletes container metadata. + |
+
{account} indicates the name of an account. {container} indicates the name of a container.
+Metadata creation or update depends on whether the specified metadata already exists. Existing metadata is updated, and missing metadata is created.
+This operation does not involve a request body.
+Create or update metadata:
+curl -i $publicURL/marktwain -X POST -H "X-Auth-Token:$token" -H "X-Container-Meta-name:value"+
Delete metadata:
+curl -i $publicURL/marktwain -X POST -H "X-Auth-Token:$token" -H "X-Remove-Container-Meta-name:x"+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
bulk-delete + |
+String +(Optional) + |
+Bulk-deletes objects. This parameter is used with the deletion list file. +A maximum of 10,000 objects can be deleted. + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
Table 2 describes the request header parameters.
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
X-Container-Read + |
+String +(Optional) + |
+Sets a container ACL that grants read access. For details about the ACL rules, see Container Read ACL Rules (X-Container-Read). + |
+
X-Container-Write + |
+String +(Optional) + |
+Sets a container ACL that grants write access. For details about the ACL rules, see Container Write ACL Rules (X-Container-Write). + |
+
X-Container-Meta-name + |
+String +(Optional) + |
+Container metadata. {name} is the name of a metadata item that you want to add, update, or delete. To delete this item, leave {name} empty in this header. You must specify an X-Container-Meta-{name} header for each metadata item (for each {name}) that you want to add, update, or delete. + |
+
X-Remove-Container-Meta-name + |
+String +(Optional) + |
+Deletes container metadata. {name} is the name of a metadata item that you want to add, update, or delete. Metadata deletion requires the X-Remove-Container-Meta-{name} parameter, and the value can be set to any non-empty character string. + |
+
X-Container-Meta-Web-Directory-Type + |
+String +(Optional) + |
+Type of the object shown as a folder. + |
+
X-Container-Meta-Web-Index + |
+String +(Optional) + |
+Name of the specified index page. + |
+
X-Container-Meta-Web-Error + |
+String +(Optional) + |
+Name of the page shown in the error information, only 401 and 404 errors supported. + |
+
X-Container-Meta-Web-Listings + |
+boolean +(Optional) + |
+Indicates whether to show the object list when no index page is configured. The value true indicates to show and false (default) not to show. + |
+
X-Container-Meta-Web-Listings-CSS + |
+String +(Optional) + |
+Type of the CSS loaded when showing the object list. + |
+
X-Web-Mode + |
+boolean +(Optional) + |
+Indicates whether to enable static website for authorized users. The value true indicates to enable and false (default) not to enable. + |
+
X-Container-Meta-Access-Control-Allow-Origin + |
+String +(Optional) + |
+Website addresses whose CORS-based access requests are allowed, which are separated from each other with commas (,). + |
+
X-Container-Meta-Access-Control-Max-Age + |
+Int +(Optional) + |
+Maximum duration during which clients can keep CORS access results (clients' browsers cache CORS access results). + |
+
X-Container-Meta-Access-Control-Expose-Headers + |
+String +(Optional) + |
+Headers that can be exposed to clients (for example browsers), separated from each other with spaces. + |
+
X-Container-Meta-Temp-URL-Key + |
+String +(Optional) + |
+Secret key value for container-layer TempURL. + |
+
X-Container-Meta-Temp-URL-Key-2 + |
+String +(Optional) + |
+A second secret key value for container-layer TempURL. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
X-Timestamp + |
+Datetime +(Required) + |
+Object creation time and date, in UNIX Epoch timestamp format. + |
+
Create container metadata Author with the value set to MarkTwain:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u/marktwain -X POST -H "X-Container-Meta-Author:MarkTwain"+
HTTP/1.1 204 No Content +X-Trans-Id: tx756aafaa7d2725f407980-172957b1a5 +Content-Type: text/html;charset=UTF-8 +Date: Sat, 19 Sep 2015 03:53:50 GMT +Content-Length: 0+
Update container metadata Author with the value set to Other:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u/marktwain -X POST -H "X-Container-Meta-Author:Other"+
HTTP/1.1 204 No Content +X-Trans-Id: tx78195a4320339a358ef6b-7d910daaf2 +Content-Type: text/html;charset=UTF-8 +Date: Sat, 19 Sep 2015 03:54:07 GMT +Content-Length: 0+
Delete container metadata Author with the value set to any non-empty character string:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u/marktwain -X POST -H "X-Remove-Container-Meta-Author:x"+
HTTP/1.1 204 No Content +X-Trans-Id: txd55ee251c5c4eb7747016-84b51a54c0 +Content-Type: text/html;charset=UTF-8 +Date: Sat, 19 Sep 2015 03:54:30 GMT +Content-Length: 0+
Users can send requests to obtain container metadata.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
HEAD + |
+/v1/{account}/{container} + |
+Shows container metadata, including the number of objects and the total bytes of all objects stored in the container. + |
+
{account} indicates the name of an account.
+{container} indicates the name of a container.
+This operation does not involve a request body.
+Show metadata of container marktwain:
+curl -i $publicURL/marktwain -X HEAD -H "X-Auth-Token:$token"+
This request does not include query parameters.
+Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
Request header parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
The following table describes the response headers:
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
Accept-Ranges + |
+String +(Required) + |
+Type of ranges that the object accepts. + |
+
X-Container-Bytes-Used + |
+Int +(Required) + |
+Total number of bytes that are stored in OBS for the container. + |
+
X-Container-Object-Count + |
+Int +(Required) + |
+Number of objects in the container. + |
+
X-Container-Meta-name + |
+String +(Optional) + |
+Custom container metadata item, where {name} is the name of the metadata item. + |
+
X-Container-Read + |
+String +(Optional) + |
+ACL that grants read access. + |
+
X-Container-Write + |
+String +(Optional) + |
+ACL that grants write access. + |
+
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
X-Timestamp + |
+Datetime +(Required) + |
+Object creation time and date, in UNIX Epoch timestamp format. + |
+
Show metadata of container marktwain:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u/marktwain -X HEAD+
HTTP/1.1 204 No Content +X-Trans-Id: tx0e8b58d90e74b1b043db5-15554c1c1a +Accept-Ranges: bytes +Content-Type: text/plain;charset=UTF-8 +Date: Sat, 19 Sep 2015 04:35:29 GMT +X-Container-Bytes-Used: 27 +X-Container-Meta-Author: Other +X-Container-Object-Count: 1 +X-Timestamp: 1442632853817 +Content-Length: 0+
Method + |
+URI + |
+Description + |
+
|---|---|---|
POST + |
+/v1/{account}?bulk-delete + |
+Batch deletes containers. A maximum of 10,000 empty containers can be deleted. + |
+
{account} indicates the name of an account.
+The request body is a text file that includes the containers to be deleted. Each line in the text file represents a container to be deleted.
+Batch delete containers:
+curl -i $publicURL?bulk-delete -XPOST -H "X-Auth-Token:$token" -T ./deletesample+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
bulk-delete + |
+String +(Required) + |
+Bulk-deletes containers. It is used together with the text file that includes the containers to be deleted. +A maximum of 10,000 empty containers can be deleted at once. + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
Request header parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
Transfer-Encoding + |
+String +(Required) + |
+Enables chunked transfer. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the text in the response body. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + |
+
Delete two empty containers: 8projectidprojectidproject000023.bucket.test6.0 and 8projectidprojectidproject000023.bucket.test6.1, and delete the container text file deletesample:
+/8projectidprojectidproject000023.bucket.test6.0 +/8projectidprojectidproject000023.bucket.test6.1+
Execute the deletion:
+curl -i -H "X-auth-token:b85044aa87eb46b88552f1dcbae411e3" http://172.28.5.31:80/v1/AUTH_09ijuyhgt675432wert56yt789i0o98u?bulk-delete -XPOST -T ./deletesample+
HTTP/1.1 100 Continue + +HTTP/1.1 200 OK +X-Trans-Id: tx0000015f80c43411770b1-a2dbb9e7c9 +Date: Fri, 03 Nov 2017 07:24:22 GMT +Content-Type: text/plain;charset=ISO-8859-1 +Transfer-Encoding: chunked + +Number Deleted: 2 +Number Not Found: 0 +Response Body: +Response Status: 200 OK +Errors:+
The requests that are sent by users to OBS (compatible with OpenStack Swift) must comply with REST specifications and contain required header parameters. If a request is successfully processed, OBS (compatible with OpenStack Swift) returns a success response. If the request cannot be processed, OBS (compatible with OpenStack Swift) returns a message that contains the cause of the error. This chapter describes REST operations on objects. Authentication is implemented based on IAM.
+
For OBS APIs, if the value of Content-Length in a request is not a valid numerical string, OBS (compatible with OpenStack Swift) will attempt to parse the content text and use it as the value of Content-Length. For example, -H"Content-Length:26abc" is equivalent to -H"Content-Length:26". OpenStack Swift, however, returns the error code 400 (Bad Request).
+This operation returns the object metadata in the response headers and the object content in the response body.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
GET + |
+/v1/{account}/{container}/{object}{?temp_url_sig,temp_url_expires,multipart-manifest} + |
+Downloads the object content and gets the object metadata. + |
+
{account} indicates the name of an account. {container} indicates the name of a container. {object} indicates the name of an object.
+This operation does not involve a request body.
+Show the content and metadata of the goodbye object in the marktwain container:
+curl -i $publicURL/marktwain/goodbye -X GET -H "X-Auth-Token:$token"+
Table 2 describes the query parameters for getting the object content.
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
temp_url_sig + |
+String +(Optional) + |
+Used with TempURL to sign the request. + |
+
temp_url_expires + |
+String +(Optional) + |
+Used with TempURL to specify the expiry time of the signature. + |
+
multipart-manifest + |
+String +(Optional) + |
+If the value is get and the object is a large object, the content of the manifest file for the static or dynamic large object, instead of the content of the large object, is returned. + |
+
filename + |
+String +(Optional) + |
+If objects are accessed based on TempURL, use the value of filename to replace that of filename in the Content-Disposition header. + |
+
inline + |
+NA +(Optional) + |
+If objects are accessed based on TempURL, replace the content of the Content-Disposition response header with inline. + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
{object} + |
+String +(Required) + |
+An object name. +For details about object naming rules, see Object Naming Rules. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
Range + |
+String +(Optional) + |
+Range of the content to get. +For example: +
|
+
If-Match + |
+String +(Optional) + |
+If the MD5 value of the queried object is equal to the specified value, the object is returned. + |
+
If-None-Match + |
+String +(Optional) + |
+If the MD5 value of the queried object is not equal to the specified value, the object is returned. + |
+
If-Modified-Since + |
+String +(Optional) + |
+If the queried object was modified before the specified time, the object is returned. + |
+
If-Unmodified-Since + |
+String +(Optional) + |
+If the queried object was not modified before the specified time, the object is returned. + |
+
The following table describes the response headers:
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
Accept-Ranges + |
+String +(Required) + |
+Type of ranges that the object accepts. + |
+
X-Object-Meta-name + |
+String +(Required) + |
+Custom object metadata item, where {name} is the name of the metadata item. + |
+
X-Timestamp + |
+Datetime +(Required) + |
+Object creation time and date, in UNIX Epoch timestamp format. + |
+
ETag + |
+String +(Required) + |
+For ordinary objects, this value is the MD5 checksum of the object content. +For manifest objects, this value is the MD5 checksum of the concatenated string of MD5 checksums for each of the segments in the manifest. + |
+
Content-Encoding + |
+String +(Optional) + |
+Code used when an object is downloaded through a browser. + |
+
Content-Disposition + |
+String +(Optional) + |
+When an object is downloaded through a browser, the default object name is newname. + |
+
X-Object-Manifest + |
+String +(Optional) + |
+This is the identifier of a dynamic large object. The value is the container and object name prefix of the segment objects in the form of container/prefix. + |
+
X-Static-Large-Object + |
+String +(Optional) + |
+Identifier of a large static object. + |
+
Content-Length + |
+String +(Required) + |
+If the operation succeeds, the value is the content length of the obtained object. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
If the MIME type of the object in the object upload is not in XXX/XXX format, OBS (compatible with OpenStack Swift) uses the default type application/octet-stream. OpenStack Swift is able to return Content-Type in non-XXX/XXX format.
+Show the content and metadata of the goodbye object in the marktwain container:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XGET+
HTTP/1.1 200 OK +X-Trans-Id: tx000001513c8f3596370c0-d09b6a1f24 +Accept-Ranges: bytes +Content-Length: 15 +Content-Type: application/octet-stream +Date: Wed, 25 Nov 2015 02:53:17 GMT +ETag: e85f5c28b588fa64a379ba876e3591d2 +Last-Modified: Wed, 25 Nov 2015 02:53:08 GMT +X-Timestamp: 1448419988.76750 + +[15 Byte data content]+
Show object details for the notexist object, which does not exist, in the marktwain container:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/notexist -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XGET+
HTTP/1.1 404 Not Found +X-Trans-Id: tx000001513c90aab6370c0-b90ea4b1b7 +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 02:54:52 GMT +Content-Length: 70 + +<html><h1>Not Found</h1><p>The resource could not be found.</p></html>+
Creating an object refers to creating an object in a specified container. Every object in a given container must have a unique name, but objects in different containers can have the same name. If you use this operation on an existing object, you replace the existing object and metadata, and the original metadata is lost.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
PUT + |
+/v1/{account}/{container}/{object}{?temp_url_sig,temp_url_expires,multipart-manifest} + |
+Creates an object in the specified container. + |
+
{account} indicates the name of an account. {container} indicates the name of a container. {object} indicates the name of an object.
+The request body of this operation is the object content.
+Create an object:
+curl -i $publicURL/marktwain/helloworld.txt -X PUT + -H "X-Auth-Token: $token"+
Table 2 describes the query parameters for getting the object content.
+ +Parameter + |
+Type + |
+Description + |
+Required or Not + |
+
|---|---|---|---|
temp_url_sig + |
+String + |
+Used with TempURL to sign the request. + |
+No + |
+
temp_url_expires + |
+String + |
+Used with TempURL to specify the expiry time of the signature. + |
+No + |
+
multipart-manifest + |
+String + |
+If multipart-manifest=put is set, the object is a static large object manifest and the body contains the manifest. + |
+No + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
{object} + |
+String +(Required) + |
+An object name. +For details about object naming rules, see Object Naming Rules. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
X-Object-Meta-name + |
+String +(Optional) + |
+Object metadata, where {name} is the name of the metadata item. To delete this item, leave {name} empty in this header. You must specify an X-Object-Meta-{name} header for each metadata item (for each {name}) that you want to add or update. + |
+
Content-Type + |
+String +(Optional) + |
+Sets the MIME type of the object. + |
+
X-Detect-Content-Type + |
+Boolean +(Optional) + |
+If it is set to true, OBS guesses the content type based on the file name extension and ignores the value sent in the Content-Type header, if present. + |
+
If-None-Match + |
+String +(Optional) + |
+Only an If-None-Match: * header can be specified. If an object already exists, the object fails to be created and a 412 status code is returned. + |
+
X-Object-Manifest + |
+String +(Optional) + |
+Set to specify that this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the container/prefix format. UTF-8 encoding must be used. + |
+
Content-Length + |
+String +(Optional) + |
+Set to the length of the object content. Do not set if chunked transfer encoding is being used. + |
+
Transfer-Encoding + |
+String +(Optional) + |
+Set to chunked to enable chunked transfer encoding. If used, the Content-Length header is ignored. + |
+
X-Copy-From + |
+String +(Optional) + |
+The format is {container}/{object}. When this header is set, {container}/{object} is copied to create an object. UTF-8 encoding must be used. +Using PUT with X-Copy-From has the same effect as using the COPY operation to copy an object. +Using PUT with X-Copy-From has the same effect as COPY to create an object. + |
+
ETag + |
+String +(Optional) + |
+MD5 checksum value of the request body. If the MD5 checksum value of the request body is equal to the value of ETag, the upload was successful. If not equal, a 422 status code is returned. +Checking the MD5 checksum value for an upload is recommended. + |
+
Content-Disposition + |
+String +(Optional) + |
+When the header is set to {newname} and an object is downloaded through a browser, the default object name {newname} is returned. + |
+
Content-Encoding + |
+String +(Optional) + |
+If this header is set, the value is the encoding format used when an object is downloaded through a browser. + |
+
If chunked transfer encoding is used and the value of Content-Length in a request is greater than the actual length of an object to be uploaded, OBS (compatible with OpenStack Swift) returns a 201 status code to indicate that the object was created successfully. In the same scenario, OpenStack Swift, in contrast, returns a 408 (Request Timeout) status code, even if but the object was created successfully.
+Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Etag + |
+String +(Required) + |
+For ordinary objects, this value is the MD5 checksum of the uploaded object content. +For static large objects, this value is the MD5 checksum of the concatenated string of MD5 checksums for each of the segments. +For dynamic large objects, the value is the MD5 checksum of the manifest file. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+Datetime +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
X-Timestamp + |
+Datetime +(Required) + |
+Object creation time and date, in UNIX Epoch timestamp format. + |
+
Create marktwain/goodbye:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XPUT -T ./goodbye.txt+
HTTP/1.1 201 Created +X-Trans-Id: tx000001513c8f12fd370c0-b7e3f340fc +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 02:53:08 GMT +ETag: e85f5c28b588fa64a379ba876e3591d2 +Last-Modified: Wed, 25 Nov 2015 02:53:08 GMT +Content-Length: 0+
Replace marktwain/goodbye (repeated creation):
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XPUT -T ./goodbye.txt+
HTTP/1.1 201 Created +X-Trans-Id: tx000001513c99de91370c0-8a64466f2c +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:04:55 GMT +ETag: e85f5c28b588fa64a379ba876e3591d2 +Last-Modified: Wed, 25 Nov 2015 03:04:55 GMT +Content-Length: 0+
You can copy an object to a new object with the same name.
+You can copy objects using PUT or COPY:
+Both methods have the same effect.
+The COPY operation always creates a new object. If you use this operation on an existing object, replace the existing object and metadata.
+If you use this operation to copy a manifest object, the new object is a normal object and not a copy of the manifest. Instead it is a concatenation of all the segment objects. This means that you cannot copy objects larger than 5 GB.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
COPY + |
+/v1/{account}/{container}/{object} + |
+Copies an object to another object in OBS (compatible with OpenStack Swift). + |
+
{account} indicates the name of an account.
+{container} indicates the name of a container.
+{object} indicates the name of an object.
+This operation does not involve a request body.
+Copy the goodbye object from the marktwain container to the janeausten container:
+curl -i $publicURL/marktwain/goodbye -X COPY -H "X-Auth-Token: +$token" -H "Destination: janeausten/goodbye"+
curl -i $publicURL/janeausten/goodbye -X PUT -H "X-Auth-Token: +$token" -H "X-Copy-From: /marktwain/goodbye" -H "Content-Length: +0"+
This operation does not include request query parameters.
+Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
{object} + |
+String +(Required) + |
+An object name. +For details about object naming rules, see Object Naming Rules. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. If you omit this header, your request fails unless the account owner has granted you access through an ACL. + |
+
Destination + |
+String +(Required) + |
+The container and object name of the destination object in the /container/object format. + |
+
X-Object-Meta-name + |
+String +(Optional) + |
+Object metadata, where {name} is the name of the metadata item. You must specify an X-Object-Meta-{name} header for each metadata item (for each {name}) that you want to add or update. + |
+
Content-Type + |
+String +(Optional) + |
+Sets the MIME type of the object. + |
+
Content-Length + |
+String +(Optional) + |
+Object length. + |
+
Content-Disposition + |
+String +(Optional) + |
+When the header is set to {newname} and an object is downloaded through a browser, the default object name {newname} is returned. + |
+
Content-Encoding + |
+String +(Optional) + |
+If this header is set, the value is the encoding format used when an object is downloaded through a browser. + |
+
X-Copy-From + |
+String +(Optional) + |
+Container and object name of the source object in the /container/object format. + |
+
If the X-Copy-From or Destination header is used to specify the name of a source or destination object, only the /container/object format is supported. OpenStack Swift lets you to use a URL as the name of a source or destination object.
+The following table describes response header parameters:
+Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Last-Modified + |
+String +(Required) + |
+Date and time that the object was created or the last time that the metadata was changed. + |
+
X-Copied-From-Last-Modified + |
+String +(Optional) + |
+For a copied object, it shows the last modified date and time. + |
+
X-Copied-From + |
+String +(Optional) + |
+For a copied object, it shows the container name and object name in the {container}/{object} format. + |
+
X-Copied-From-Account + |
+String +(Optional) + |
+Account ID of the user who owns the object to be copied. + |
+
Etag + |
+String +(Required) + |
+For ordinary objects, this value is the MD5 checksum of the uploaded object content. +For static large objects, this value is the MD5 checksum of the concatenated string of MD5 checksums for each of the segments. +For dynamic large objects, the value is the MD5 checksum of the manifest file. + |
+
X-Object-Meta-name + |
+String +(Optional) + |
+The custom object metadata item. +{name} is the name of the metadata item. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+String +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
Use the COPY command to copy an object. In this example, the source object is janeausten/goodby and the destination object is marketwain/goodbye.
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XCOPY -H "Destination:janeausten/goodbye"+
HTTP/1.1 201 Created +X-Trans-Id: tx000001513c9e87a1370c0-144543b5de +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:10:01 GMT +ETag: e85f5c28b588fa64a379ba876e3591d2 +Last-Modified: Wed, 25 Nov 2015 03:10:01 GMT +X-Copied-From: marketwain/goodbye +X-Copied-From-Account: AUTH_4b34aa268d8c45879cf4da16443d3f95 +X-Copied-From-Last-Modified: Wed, 25 Nov 2015 03:04:55 GMT +Content-Length: 0+
Use the PUT command to copy an object. In this example, the source object is janeausten/goodby and the destination object is marketwain/goodbye.
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/janeausten/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -H "X-Copy-from:/marketwain/goodbye" -XPUT -H "Content-Length:0"+
HTTP/1.1 201 Created +X-Trans-Id: tx000001513ca34816370c1-16ea772e65 +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:15:12 GMT +ETag: e85f5c28b588fa64a379ba876e3591d2 +Last-Modified: Wed, 25 Nov 2015 03:15:12 GMT +X-Copied-From: marketwain/goodbye +X-Copied-From-Account: AUTH_4b34aa268d8c45879cf4da16443d3f95 +X-Copied-From-Last-Modified: Wed, 25 Nov 2015 03:04:55 GMT +Content-Length: 0+
The DELETE command is used to delete a specified object. After an object is deleted, any subsequent GET, HEAD, POST, or DELETE operations return a 404 Not Found error code.
+For static large objects, you can add the multipart-manifest=delete query parameter. This operation deletes the segment objects and if all deletions succeed, this operation deletes the manifest object.
+Normally the DELETE operation does not return a response body. However, with the multipart-manifest=delete query parameter, the response body contains a list of manifest and segment objects and the status of their delete operations.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
DELETE + |
+/v1/{account}/{container}/{object}{?multipart-manifest} + |
+Permanently deletes an object from the OBS system. + |
+
{account} indicates the name of an account.
+{container} indicates the name of a container.
+{object} indicates the name of an object.
+This operation does not involve a request body.
+Delete the helloworld object from the marktwain container.
+curl -i $publicURL/ +marktwain/helloworld -X DELETE -H "X-Auth-Token: $token"+
Header + |
+Type + |
+Description + |
+
|---|---|---|
multipart-manifest + |
+String +(Optional) + |
+If you include the multipart-manifest=delete query parameter and the object is a static large object, the segment objects and the manifest object are deleted. +If you omit the multipart-manifest=delete query parameter, the manifest object is deleted and the segment objects are not deleted. +If this is a dynamic large object, do not specify multipart-manifest=delete query parameter. + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
{object} + |
+String +(Required) + |
+An object name. +For details about object naming rules, see Object Naming Rules. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. If you omit this header, your request fails unless the account owner has granted you access through an ACL. + |
+
The following table describes response header parameters:
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+If the operation succeeds, this value is 0. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+String +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
Delete the goodbye object from the janeausten container:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/janeausten/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -X DELETE+
HTTP/1.1 204 No Content +X-Trans-Id: tx000001513cb0b434370c1-82374dd941 +Content-Length: 0 +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:29:52 GMT+
Delete the non-existing goodbye object from the janeausten container:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/janeausten/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -X DELETE+
HTTP/1.1 404 Not Found +X-Trans-Id: tx000001513cb1e9c6370c1-4c3eaf057d +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:31:11 GMT +Content-Length: 70 + +<html><h1>Not Found</h1><p>The resource could not be found.</p></html>+
This operation shows object metadata.
+If the Content-Length response header is not 0, the cURL command stalls after it prints the response headers because it is waiting for a response body, but OBS does not return a response body.
+ +Method + |
+URI + |
+Description + |
+
|---|---|---|
HEAD + |
+/v1/{account}/{container}/{object}{?temp_url_sig,temp_url_expires} + |
+Shows object metadata. + |
+
{account} indicates the name of an account.
+{container} indicates the name of a container.
+{object} indicates the name of an object.
+This operation does not involve a request body.
+Show object metadata:
+curl -i $publicURL/marktwain/goodbye -X HEAD -H "X-Auth-Token:$token"+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
temp_url_sig + |
+String +(Optional) + |
+Used with TempURL to sign the request. + |
+
temp_url_expires + |
+String +(Optional) + |
+Used with TempURL to specify the expiry time of the signature. + |
+
Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
{object} + |
+String +(Required) + |
+An object name. +For details about object naming rules, see Object Naming Rules. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. + |
+
The following table describes response header parameters:
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
Last-Modified + |
+String +(Required) + |
+Date and time that the object was created or the last time that the metadata was changed. + |
+
Content-Length + |
+String +(Required) + |
+Length of the object content in the response body, in bytes. + |
+
Etag + |
+String +(Required) + |
+For ordinary objects, this value is the MD5 checksum of the uploaded object content. +For static large objects, this value is the MD5 checksum of the concatenated string of MD5 checksums for each of the segments. +For dynamic large objects, the value is the MD5 checksum of the manifest file. + |
+
X-Object-Meta-name + |
+String +(Optional) + |
+Custom object metadata item. +{name} is the name of the metadata item. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+String +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + + |
+
X-Timestamp + |
+Datetime +(Required) + |
+Object creation time and date, in UNIX Epoch timestamp format. + |
+
Content-Encoding + |
+String +(Optional) + |
+Code used when an object is downloaded through a browser. + |
+
Content-Disposition + |
+String +(Optional) + |
+When an object is downloaded through a browser, the default object name is newname. + |
+
X-Object-Manifest + |
+String +(Optional) + |
+This is the identifier of a dynamic large object. The value is the container and object name prefix of the segment objects in the form of container/prefix. + |
+
X-Static-Large-Object + |
+String +(Optional) + |
+Set to True if this object is a static large object manifest object. + |
+
Show metadata of the goodbye object in the marketwain container:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XHEAD+
HTTP/1.1 200 OK +X-Trans-Id: tx000001513cbab7ca370c1-d95dee8729 +Accept-Ranges: bytes +Content-Length: 15 +Content-Type: application/octet-stream +Date: Wed, 25 Nov 2015 03:40:48 GMT +ETag: e85f5c28b588fa64a379ba876e3591d2 +Last-Modified: Wed, 25 Nov 2015 03:40:30 GMT +X-Object-Meta-Author: other +X-Timestamp: 1448422830.47760+
Users can send requests to create, update, or delete object metadata.
+Method + |
+URI + |
+Description + |
+
|---|---|---|
POST + |
+/v1/{account}/{container}/{object} + |
+Creates, updates, or deletes object metadata. + |
+
{account} indicates the name of an account.
+{container} indicates the name of a container.
+{object} indicates the name of an object.
+A POST request deletes all existing user metadata.
+Metadata creation or update depends on whether the specified metadata already exists. Existing metadata is updated, and missing metadata is created.
+This operation does not involve a request body.
+Create or update metadata:
+curl -i $publicURL/marktwain/goodbye -X POST -H "X-Auth-Token:$token" -H "X-Object-Meta-name:value"+
Delete metadata:
+curl -i $publicURL/marktwain/goodbye -X POST -H "X-Auth-Token:$token" -H "X-Object-Meta-name:"+
This request does not include query parameters.
+Request URI parameters
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
{account} + |
+String +(Required) + |
+A unique account name. In the current version, it indicates a unique ID for the account. + |
+
{container} + |
+String +(Required) + |
+A unique container name. +For details about container naming rules, see Naming Rules. + |
+
{object} + |
+String +(Required) + |
+An object name. +For details about object naming rules, see Object Naming Rules. + |
+
Header + |
+Type + |
+Description + |
+
|---|---|---|
X-Auth-Token + |
+String +(Required) + |
+Authentication token. If you omit this header, your request fails unless the account owner has granted you access through an ACL. + |
+
X-Object-Meta-name + |
+String +(Optional) + |
+Object metadata, where {name} is the name of the metadata item. To delete this item, leave {name} empty in this header. You must specify an X-Object-Meta-{name} header for each metadata item (for each {name}) that you want to add or update. + |
+
Content-Type + |
+String +(Optional) + |
+Sets the MIME type of the object. + |
+
X-Detect-Content-Type + |
+Boolean +(Optional) + |
+If it is set to true, OBS guesses the content type based on the file name extension and ignores the value sent in the Content-Type header, if present. + |
+
Content-Length + |
+String +(Optional) + |
+Set to the length of the object content. Do not set if chunked transfer encoding is being used. + |
+
Content-Disposition + |
+String +(Optional) + |
+When the header is set to {newname} and an object is downloaded through a browser, the default object name {newname} is returned. + |
+
Content-Encoding + |
+String +(Optional) + |
+If this header is set, the value is the encoding format used when an object is downloaded through a browser. + |
+
The following table describes response header parameters:
+ +Header + |
+Type + |
+Description + |
+
|---|---|---|
Content-Length + |
+String +(Required) + |
+If the operation succeeds, the value is the length of the response body. +If the operation fails, this value is the length of the error text in the response body. + |
+
Content-Type + |
+String +(Required) + |
+MIME type of the object. + |
+
Date + |
+String +(Required) + |
+Transaction date and time. + |
+
X-Trans-Id + |
+Uuid +(Required) + |
+A unique transaction identifier. + |
+
Create object metadata Author with the value set to other:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XPOST -H "X-Object-Meta-author:other"+
HTTP/1.1 202 Accepted +X-Trans-Id: tx000001513cba7176370c1-adee95a013 +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:40:30 GMT +Content-Length: 76 + +<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>+
Update object metadata Author with the value set to marktwain:
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XPOST -H "X-Object-Meta-author:marktwain"+
HTTP/1.1 202 Accepted +X-Trans-Id: tx000001513cbfbf2f370c2-f9e7f1cf40 +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:46:18 GMT +Content-Length: 76 + +<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>+
Delete the metadata author, and leave the value blank.
+curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f" -XPOST -H "X-Object-Meta-author:"+
HTTP/1.1 202 Accepted +X-Trans-Id: tx000001513cc10d85370c2-cddc60cba5 +Content-Type: text/html;charset=UTF-8 +Date: Wed, 25 Nov 2015 03:47:43 GMT +Content-Length: 76 + +<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>+
A + |
+|
ACL + |
+Access control list. An ACL describes a user's permission to access a container or object. + |
+
Account + |
+A logical concept at the top layer of OBS APIs, corresponding to the tenant in IAM. Multiple containers can be stored in an account. + |
+
C + |
+|
Container + |
+Objects uploaded by users are stored in containers. Only a user with the write permission of a container can upload an object to that container. A user can have a maximum of 10,000 containers, and each object stored in a container must be unique. + |
+
K + |
+|
Key + |
+A key is a unique identifier of an object in a container. An object is uniquely identified by its key and the name of the container to which the object belongs. When users send requests to OBS (compatible with OpenStack Swift), /BucketName/ObjectKey is used to determine the target object. + |
+
L + |
+|
Large Object + |
+A large object contains multiple segment objects, which are normal objects in OBS. Large objects can be classified into dynamic large objects and static large objects. A dynamic large object specifies the same prefix for all the segment objects to form a large object. A static large object specifies the names for all the segment objects to form a large object. + |
+
O + |
+|
Object + |
+Fundamental entities stored in OBS (compatible with OpenStack Swift). The data uploaded by users is stored in the OBS as objects. An object consists of object data and metadata. In a single upload operation, the object can be of any data type and with a size ranging from 0 bytes to 5 GB (configurable, 5 GB by default). An object uploaded in segments can be of any data type and with a size ranging from 0 bytes to 5 TB. Object metadata contains multiple key pairs that describe properties including the data type and MD5 value. OBS (compatible with OpenStack Swift) automatically generates metadata on the server for the uploaded data. + |
+
ACL + |
+Access Control List + |
+
URI + |
+Uniform Resource Identifier + |
+
URL + |
+Uniform Resource Locator + |
+
ASCII + |
+American standard code for information interchange + |
+
UTF + |
+Unicode Transformation Format + |
+
Released On + |
+What's New + |
+
|---|---|
2021-12-10 + |
+This is the second official release. +This issue incorporates the following change: +Optimized some descriptions. + |
+
2018-03-15 + |
+This is the first official release. + |
+