VerticaAPIKey
管理 API 需要使用名为 VerticaAPIKEY 的身份验证密钥来访问某些 API 资源。可以使用 apikeymgr 命令行工具管理 API 密钥。
usage: apikeymgr [-h] [--user REQUESTOR] [--app APPLICATION] [--delete]
[--create] [--update] [--migrate]
[--secure {restricted,normal,admin}] [--list]
API key management tool
optional arguments:
-h, --help show this help message and exit
--user REQUESTOR The name of the person requesting the key
--app APPLICATION The name of the application that will use the key
--delete Delete the key for the given R & A
--create Create a key for the given R & A
--update Update a key for the given R & A
--migrate migrate the keyset to the latest format
--secure {restricted,normal,admin}
Set the keys security level
--list List all the keys known
示例请求
若要为 dbadmin
用户创建具有 admin
访问权限的新的 VerticaAPIKEY,请输入以下命令:
$ apikeymgr --user dbadmin --app vertica --create --secure admin
响应:
Requestor : dbadmin
Application: vertica
API Key : ValidAPIKey
Synchronizing cluster...