Resource path line
The resource path line for an HSwift request specifies the operation target, whether it be an account, container, or object.
In the resource path for an HSwift request that uses Keystone authentication, the account name is interchangeable with the Tenant Id Prefix (default is AUTH_) followed by the Keystone Tenant ID. For example:
api.hcp.example.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e/finance
In the resource path, the tenant ID prefix and Keystone tenant ID can be replaced with the HSwift account name. For example:
api.hcp.example.com/swift/v1/europe/finance
If the target of the request is a container, the resource path includes a forward slash followed by the container name.
If the target of the operation is an object, the request line includes a forward slash followed by the object name following the container name.
For example, here are the Keystone tenant authentication token and account name resource paths for a request to create an object named Q4_2012.ppt:
api.hcp.example.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e/finance/Q4_2012.ppt api.hcp.example.com/swift/v1/europe/finance/Q4_2012.ppt
If the request uses any query parameters, those parameters are appended to the resource path.
For example, here is a request URL to alphabetically list all containers in the europe account between the letters E and S:
http://api.hcp.example.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e?marker=e&end_marker=s http://api.hcp.example.com/swift/v1/europe?marker=e&end_marker=s
If the request includes invalid query parameters, those parameters are ignored.
Targeting an account
In an HSwift request, if the target is an account, you use a URL in this format:
http[s]://api.hcp-domain-name/swift/v1/AUTH_ID
In the format above, the account name is replaced with the Keystone Prefix tenant ID (AUTH_) and the Keystone tenant ID. This is interchangeable with the HSwift account name.
Here’s an example in which the HSwift account is europe and the account name is used in place of the Keystone Prefix tenant ID and the Keystone tenant ID:
https://api.hcp.example.com/swift/v1/europe
Targeting a container
In an HSwift request that uses Keystone authentication, if the target is a container, you use a URL in this format:
http[s]://api.hcp-domain-name/swift/v1/AUTH_ID/container-name
In the format above, the account name is replaced with the Keystone Prefix tenant ID (AUTH_) and the Keystone tenant ID. This is interchangeable with the HSwift account name.
Here’s an example in which the HSwift account name is europe
and the container name is finance
. The account name is used in place of the Keystone Prefix tenant ID and the Keystone tenant ID:
https://api.hcp.example.com/swift/v1/europe/finance
Targeting an object
In an HSwift request that uses Keystone authentication, if the target is an object, you use a URL in the following format:
http[s]://api.hcp-domain-name/swift/v1/AUTH_ID/container-name/object-name
In the format above, the account name is replaced with the Keystone Prefix tenant ID (AUTH_) and the Keystone tenant ID. This is interchangeable with the HSwift account name.
Here’s an example in which the HSwift account name is europe
, the container name is finance
, and the object name is Q4_2012.ppt
. The account name is used in place of the Keystone Prefix tenant ID and the Keystone tenant ID:
https://api.hcp.example.com/swift/v1/europe/finance/Q4_2012.ppt