I am currently trying to use the Rest API with a standalone docker image of Db2 Warehouse developer edition.
I have downloaded the docker image from the IBM docker hub "https://hub.docker.com/_/ibm-db2-warehouse-dev?tab=resources"
After having installed the image, I have been able to use successfuly the V1 of the rest API, by loading data from a file with raw data towards a Db2 table.
But now I am trying to use the V2 or V3 of the rest API, but unfortunately, it does not work. I work on Linux OpenSuse 15.0. The curl version I use is 7.60.0 (x86_64-suse-linux-gnu).
Test with V3 rest API
curl -X POST "https://192.168.66.56:8443/dbapi/v3/auth/tokens" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"userid\": \"foo\", \"password\": \"bar\"}"
This command returns nothing.
I have tried to add the user parameter to the curl command line:
curl -X POST "https://192.168.66.56:8443/dbapi/v3/auth/tokens" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"userid\": \"foo\", \"password\": \"bar\"}" --user "foo:bar"
then curl returns:
{
"trace": "",
"errors": [
{
"code":"not_found",
"message": "The requested resource is not found",
"target": {
"type": "",
"name": ""
},
"more_info": ""
}
]
}[
I have exactly the same behavior with the V2 rest API. I have tried to play with single and double quotes, it changes nothing.
I am wondering if the V2/V3 of the rest API is implemented/installed on the Db2 Warehouse docker image, according to the response I get from curl The requested resource is not found.
Any clue will be appreciated !
Thanks !