Yes - what's reported is a "west wind." But the wind bearing is east.
The wind direction is the compass heading from which the wind is blowing (so, 90.0 °, or West), but the wind bearing is the direction in which the wind is moving, so East.
Put a weather vane in a west wind and it will point east.
In short, compassDirection = windBearing.
That's my understanding.
Post
Replies
Boosts
Views
Activity
Same issue. Was working fine last time I checked a couple of weeks ago. Now getting 403 Access denied. What's up with this?
Thank you. I was in fact forgetting the country parameter.
Same here
I have the same experience, 401 Unauthorized. Retries usually work, even without a backoff.
I'll add that it's pretty unusual that the console doesn't break down total requests by return code.
The REST API doesn't seem ready for production use.
An update. Seems like maybe @Hi_Thomas solution was a coincidence, as someone else suggested. I am getting 401 errors again starting today.
Why is Apple not saying anything about this? They are on the boards answering other questions. But they ignore this issue that is clearly the biggest cause of concern.
I'm happy if they say we devs are doing something wrong. But the silence is unprofessional. Here are things you can say:
We are looking into it but don't know anything yet.
We've looked into it, and everything is fine on our end
We have isolate the root cause and are working on a fix, though we don't have a timeline for when we will deploy a fix.
We decided not to look into it.
Even 4. is better than nothing.
Yes. Many people have posted about this. And 401 and 404. Often the exact same request will go through on retry. This is an issue with the API. It's not ready for production traffic.
I appreciate that posting here is not the same as opening a support ticket. But Apple engineers have answered questions about REST API errors and other questions here.
And there have been so many questions about the WeatherKit REST API throwing intermittent errors (502:Bad Gateway; 401:Not Authorized). Here's a sample:
https://developer.apple.com/forums/thread/725397
https://developer.apple.com/forums/thread/724132
https://developer.apple.com/forums/thread/723971
And there's no response...
I am getting weather alerts as expected. Perhaps use the time zone name instead of the abbreviation?
Per docs: "The name of the timezone to use for rolling up weather forecasts into daily forecasts"
I didn't look at why my requests were failing (error code/ timing out) - but yes. For about an hour this morning I don't seem to have gotten many 200 responses from the API.
The API remains unreliable. It cannot be used for production without a backup weather source in place.
It doesn't help that we don't get any information from Apple other than number of requests (response time? return code? hello?). And that WeatherKit always just shows "Green" as its status.
It's hard to tell whether Weatherkit is down this morning (3/31) or just the normal amount of terrible.
But don't worry - even if none of your calls are going through, the system status is GREEN, so it's okay.
Why is Weatherkit system status GREEN?
Why is WeatherKit a hot mess?
Why hasn't apple SAID ANYTHING to reassure developers that they know it's a hot mess over the last months?
Why is Apple shutting down Dark Sky without having the promised replacement in place?
Do you always get a 504s or only intermittently? Does the same call get a 504 and then work on retry?
I wish the API usage details included some more info. Just giving total # of calls is okay if the service is rock solid.
Given that WeatherKit is flaky as hell, info about # of calls, return codes, response times, etc., would be great.
Also, a SLA would be much appreciated at this point.
You're right. It says it's temporarily unavailable.
I guess that's consistent with the System Status being green.
But, again, hard not to draw the comparison. Dark Sky managed to provide it uninterrupted for the life of the API.
I wish Apple would communicated to developers better.