透過 RESTful API 存取 Ceph 儲存空間
建立 API 使用者
連線至終端機介面
Warning: Permanently added '192.168.1.x' (ECDSA) to the list of known hosts.
Password:
要建立 API 使用者,請執行以下指令:
命令列介面:儲存 > RESTful > 建立金鑰
controller> storage
controller:storage> restful
controller:restful> key_create
Input username: bigstack
5343c5c8-dc07-4427-bc07-9e4956b05a44
若要列出所有 API 金鑰,請執行以下指令:
命令列介面:儲存空間 > RESTful > 鍵值清單
controller:restful> key_list
{
"bigstack": "5343c5c8-dc07-4427-bc07-9e4956b05a44"
}
您可以使用 curl 來測試您API
以下是一個範例:
Reference
欲了解其他用法,請參閱以下連結:Ceph Restful 模組