I tried to add my Watson Knowledge Studio model id to my Watson Discovery configuration as described here.
Downloading my config with this command works great:
curl -u "{username}":"{password}" "https://gateway.watsonplatform.net/discovery/api/v1/environments/{environment_id}/configurations/{configuration_id}?version=2016-12-01" > my_config.json
But when I just tried to upload this file without any changes with this command:
curl -X PUT -u "{username}":"{password}" -H "Content-Type: application/json" -F configuration=@my_config.json "https://gateway.watsonplatform.net/discovery/api/v1/environments/{environment_id}/configurations/{configuration_id}?version=2016-12-01"
I will always get an:
{
"code": 400,
"error": "Unexpected token -"
}
Did I miss something?
After some help from IBM, it seems that the documentaiton is wrong. The correct command is
curl -X PUT -u "{username}":"{password}" -H "Content-Type: application/json" -d@my_config.json "https://gateway.watsonplatform.net/discovery/api/v1/environments/{environment_ID}/configurations/{Configuration_ID}?version=2016-12-01"