I'm trying to retrieve weather data by latitude and longitude. I've reviewed the API on the NOAA website and I believe I'm creating my URL as indicated. However I get an error every time I try to look by lat/long. I can retrieve based on zip code, but I need to use lat/long as there are foreign locations I need data for as well.
Here is the URL I am trying to access:
http://www.ncdc.noaa.gov/cdo-services/services/datasets/GHCND/locationsearch?latitude=35.59528&longitude=-82.55667token=XuynqsXFIGjQEXIshdoyFizBgrdZdwXO
Here is the API from their website, specific to the lat/long search:
http://www.ncdc.noaa.gov/cdo-web/webservices/cdows_locationsearch
and I get this error:
<cdoError>
<name>Internal Error</name>
<message>CDO Web Services error</message>
</cdoError>
Does anyone have a suggestion? Am I creating the URL incorrectly?
You are missing an & before token:
http://www.ncdc.noaa.gov/cdo-services/services/datasets/GHCND/locationsearch?latitude=35.59528&longitude=-82.55667&token=XuynqsXFIGjQEXIshdoyFizBgrdZdwXO
Related
I am facing a weird issue with microsoft's graph api.
I am trying to retrieve files stored on Sharepoint. I don't know what the issue is and I have tried a lot of different things:
Call to get all drives for the site works and returns a list of all available drives:
GET https://graph.microsoft.com/v1.0/sites/site.sharepoint.com,<id>,<id>:/teams/myTeam:/drives
Via the previous endpoint I can extract the id for that drive with which I would then like to retrieve drive details (and in consequence all children of that drive):
GET https://graph.microsoft.com/v1.0/sites/site.sharepoint.com,<id>,<id>:/teams/myTeam:/drives/<driveId>
GET https://graph.microsoft.com/v1.0/sites/site.sharepoint.com,<id>,<id>:/teams/myTeam:/drives/<driveId>/root
GET https://graph.microsoft.com/v1.0/sites/site.sharepoint.com,<id>,<id>:/teams/myTeam:/drives/<driveId>/root/children
But all 3 above endpoints throw a 400 Bad Request Error with message: Url specified is invalid.
Additional information:
My access token has the following scopes: Sites.FullControl.All User.Read profile openid email
I am able to retrieve an individual drive item through the list endpoints (but the folder structure is quite complex and I need to list several layers of folders/files - this is why I believe the syntax with drive would be a lot more convenient):
GET https://graph.microsoft.com/v1.0/sites/site.sharepoint.com,<id>,<id>:/teams/myTeam:/lists/<list-id>/items/<item-id>/driveItem
via the field parentReference I am also able to fetch the driveId and even the relative path (/drives/<drive-id>/root:) but I also have no idea how I would get the content from that.
Help is greatly appreciated as I have been stuck for a long time now - thank you!
Try with the below HTTP call.
https://graph.microsoft.com/v1.0/sites/site.sharepoint.com,<id>,<id>/drives/driveid/root/children
It worked for me.
I am hoping someone might be able to help me with this,
I unable to connect https://services.odata.org/V4/Northwind/Northwind.svc/
however, it comes to using our endpoint, which is $metadata
I get an error message 'Bad Odata format make sure you are using a URL that points to a valid OData source
Also, I can open this URL in my web browser
I can't seem to troubleshoot, this can anyone suggest anything I can try?
I have also tried changing the IP to a name, but still same error.
Your OData server returns XML data instead of JSON.
Change your configuration in JSON format it will work.
I am looking into getting a geolocation database. I am trying to understand the difference between a paid and a free service besides how accurate the results are.
I want to display data on the page based on the user's location. Should I user server side or client side to check the location and display the data accordingly? I can imagine how to do it server side, but not client side.
If I want to get the user's ip, country, region, city, and show the cities within x km around that city, I would also need the Latitude and Longitude correct?
I was looking at
http://freegeoip.net/
and
http://www.ip2location.com/databases#comparison
option: DB5
I suggest maxmind database for Geo location, I have used maxmind database for my
website
the link of maxmind data base is-http://maxmind.com/geoip/legacy/geolite/
freegeoip uses maxmind GeoLite2 database. You could as well download it yourself (~25mb) and lookup on your server which would be faster.
I found that we can use stream API to get the latest tweets based on hash tags or keywords.
It says you have to keep your http connection open. I am having a doubt regarding this.
Can anyone give me an example of stream API in php?
And other thing can I skip hashtag and keyword parameter is this API ? So I can all the statuses?
Can I pass a parameter like latitude and longitude to get tweets from the specific region?
You can request tweets by location, see their API documentation for specifying location boundaries:
https://dev.twitter.com/docs/streaming-apis/parameters#locations
I am new to yelp API. I am using version2. I did sign up for API access and got, Consumer Key,Consumer secret, token, token_secret, then I used to the following link
http://api.yelp.com/v2/search?http://api.yelp.com/v2/search?term=food&location=San%2BFrancisco&oauth_consumer_key=SOMEKEY&oauth_consumer_secret=SOMESECRET&oauth_token=SOMETOKEN&oauth_token_secret=SOMESECRET
to get the data but then I get a series of MISSING_PARAMETER errors. For signature_method I used HMAC-SHA1 but for the rest (oauth_signature, oauth_nonce, oauth_timestamp) I iddn't know what to put, so i used an empty field but then I got "INVALID CREDENTIAL" error. How do I get these missing fields?
They are not in my API access page.
First of all you can't publish your keys like that, you need to run a script to "encrypt" them and once you "send" those keys you handshake with yelp and than make a query for the search you are trying to get results for.
Basically you need a script in your preferred language (PHP for example) to make the query. a good start might be https://github.com/Yelp/yelp-api/tree/master/v2