运行示例需要的环境变量

运行示例需要的环境变量

为这些请求运行cURL命令的例子,设置这些环境变量:

publicURL
publicURL是你可以从任何地方访问对象存储的HTTP端点,它包括对象储存API版本号和你的账户名字。例如,https://23.253.72.207/v1/my_account.
token
对象存储的身份验证。

获取这些值,运行:“swift stat -v”命令。

如例子所示,公有URL显示在``StorageURL`` 区域, 令牌显示在 ``Auth Token``区域:

StorageURL: https://23.253.72.207/v1/my_account
Auth Token: {token}
Account: my_account
Containers: 2
Objects: 3
Bytes: 47
Meta Book: MobyDick
X-Timestamp: 1389453423.35964
X-Trans-Id: txee55498935404a2caad89-0052dd3b77
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.