Hello,
I want to call the WTO API, but I have a strange problem. It seems that Knime has a problem when this API returns the result as json.
When I call the API with this URL: https://api.wto.org/timeseries/v1/data?i=ITS_MTV_AX and my API key: XYZ with Postman, it works fine. If I do the same in KNIME, the body is missing, status = 200 and I get the error message: ‘Response does not have a media type’.
I have already tried several additional request headers and nothing has changed. I have also tried a more specific API call with this URL, same problem:
https://api.wto.org/timeseries/v1/data?i=ITS_MTV_AX&r=004,008,012,016,020,024,660,028,032,051,036,040,031,044,048,050,052,112,056,058,084,204,060,064,068,070,072,076,096,100,854,108,132,116,120,124,136,964,140,148,152,156,170,174,178,184,188,384,191,192,531,196,203,180,208,262,212,214,218,818,222,226,232,233,748,231,918,234,242,246,250,258,260,266,270,268,278,276,288,292,300,304,308,316,320,324,624,328,332,340,344,348,352,356,360,364,368,372,376,380,388,392,400,398,404,296,408,410,414,417,418,428,422,426,430,434,440,442,446,450,454,458,462,466,470,584,478,480,175,484,583,498,496,893,500,504,508,104,516,520,524,528,530,533,540,554,558,562,566,570,807,580,578,512,586,585,591,598,600,604,608,616,620,634,642,643,646,659,662,666,670,882,678,682,686,892,891,690,694,702,534,703,705,090,706,710,728,724,144,736,740,752,756,760,158,762,834,764,626,768,772,776,780,788,792,795,796,798,810,800,804,784,826,840,888,858,860,548,862,704,092,876,887,890,894,716&p=default&ps=default&pc=TO,AG,AGFO,MI,MIFU,MA,MAIS,MACH,MACHPH,MAMT,MAMTOF,MAMTOTEP,MAMTOTTL,MAMTOTIC,MAMTTE,MAMTAU,MATE,MACL&spc=false&fmt=json&mode=full&dec=default&off=0&max=500&head=H&lang=1&meta=false
If I replace the fmt=json with fmt=csv I get something back, but in a ugly format.
Some ideas?
Thank’s a lot!