【问题标题】:Got an error in the IBM Bluemix Weather Insights API used. Kindly help me out使用的 IBM Bluemix Weather Insights API 出现错误。请帮帮我
【发布时间】:2016-06-03 17:54:21
【问题描述】:

我在这里引用文档页面: https://developer.ibm.com/bluemix/2015/10/23/ibm-insights-weather-available-in-bluemix/

但我收到以下错误:

{"metadata":{"version":"1","transaction_id":"1:677162605","status_code":404},"success":
false,"errors":[{"error":{"code":"AGW-0114","message":"Failed to parse apiname"}}]}

我的构建网址是:

https://****:*****@twcservice.mybluemix.net/api/weather/v2/forecast/&format=JSON&geocode=11.9310,%2079.7852&language=en-US&units=e

请帮我解决这个问题。

【问题讨论】:

    标签: ibm-cloud weather weather-api


    【解决方案1】:

    构造的url需要是这样的:

    https://twcservice.mybluemix.net/api/weather/v2/forecast/hourly/24hour?format=JSON&geocode=11.9310%2C79.7852&language=en-US&units=e

    区别在于:

    • 调用 REST API /forecast/hourly/24hour 而不仅仅是 /forecast
    • 添加 ?在 API 的末尾,以便您传递参数
    • 在地理编码中添加 %2C 以表示 ,

    见招摇文档here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-21
      • 2015-09-13
      • 1970-01-01
      • 2021-07-18
      • 1970-01-01
      • 1970-01-01
      • 2010-12-13
      相关资源
      最近更新 更多