[英]how to connect via REST at IBM DB2?
我在 IBM 雲中創建了一個 DB2 服務,我讀到我可以通過 REST 在我的數據庫中訪問。
所以,我嘗試使用這個連接:
curl -k -X POST 'https://MY_DB_URL/dbapi/v4/auth/tokens'
-d '{"userid":"MY_SERVICE_USER", "password":"MY_SERVICE_PASSWORD"}'
並且響應始終是:
{"trace":"TRACE_CODE","errors":
[{
"code":"invalid_parameters",
"message":"HWCSEC0012E: The credential is invalid! For regular credentials, both the user name and password are required. For IAM API key or token credentials, they mustn't be empty.",
"target":{"type":"","name":""},
"more_info":""
}]
}
我真的不知道如何解決。
文檔:
我解決。 他們想要在 header {Content-Type: text/plain} 這沒有意義,正文是 json...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.