答案 0 :(得分:0)
您确定要提供Discovery Service凭据吗?如果您然后检查您的用户名和密码是否正确。
访问Discovery Service时,请选择名称为 Service Credentials 的选项。
将username
和password
替换为这些值。
请参阅一个示例来访问:
curl -X POST -u "USERNAME":"PASSWORD" -H "Content-Type: application/json" -d '{ "name":"my-first-environment", "description":"exploring environments", "size":0}' "https://gateway.watsonplatform.net/discovery/api/v1/environments?version=2016-12-01"
编辑:
curl -X POST -u "{username}":"{password}" -H "Content-Type: application/json" -d '{ "name": "test_collection", "description": "My test collection", "configuration_id": "{configuration_id}" }' "https://gateway.watsonplatform.net/discovery/api/v1/environments/{environment_id}/collections?version=2016-12-01"