Where can I find a real example map from Uber API? I have set the request status to "accepted" but the embeded map URL is still an invalid 404-link.
I just want to see the map provided in the API-call: https://developer.uber.com/docs/v1-requests-map.
How can I find it?
For requests made in the sandbox a static map is returned when calling GET /v1/requests/:request_id:/map
For now that map will be the same for all sandbox requests and does not change as the sandbox request changes states. However, we are always improving the sandbox experience and the map will eventually be a more interactive map as the production ones are.
Related
With there being rate limits should I ask for an increase when trying to get all access approval? Since my app asks the driver/ rider to sign in using their uber credentials will this help limit the calls to the API?
Thanks in advance.
Probably not, but it depends entirely on your purpose.
Calls to an API are usually done to get or update data on the home servers, in this case Uber's servers. As such, any Uber specific information you require will likely need to be accessed through their API.
Now, I've not reviewed Uber's API so if you can use the return from the login request to resolve all your needs then great. However, if you need to get data from their servers it would only reduce calls to the API if they require data returned on the login which can only otherwise be retrieved by making another call to their API.
I have recently started testing rest based web services. I am wondering what are common issues faced while testing them.
I generally look for
response status (http code is among 200/400/500)
response headers (cache control, response type, content length )
if expected fields / values are present in json response.
I want to know what else to look for and issues in general while testing rest based web services
This is actually a very broad question but, here are the things that I look for while testing rest API's:
Response codes, Response headers
Check if Authentication/Authorization is correct based on user privileges
Check to see if the supplied value can break the output
Intentionally pass different Data-Type values to see if proper handling is done or not
Use load testing tools to see how many concurrent requests an API can handle
Again these are just a few things that will depend on the type of API you are building. Feel free to add more as you progress.
There are many, but let me share a few that aren't even specifically API issues but a full API integration test will help find it.
We did an integration API test where a publisher's product listing endpoint was hit, and then we randomly picked 100 of those products. Every few weeks we would find a bunch of bad product ID's. How was it possible? They would update the database but the product listing endpoint was cached and had bad information for hours until it was refreshed automatically.
Another time we found an e-commerce company in Brooklyn that, on average, had 3,500 products out of their 50k+ were missing a category. This meant 3,500 products not showing up if you browsed by categories, and potential lost sales.
We have a whole case study of this stuff on our website. Weird and unexpected stuff happens all the time. Test for everything and catch as much as you can. Every object in the payload should be verified, it may seem like overkill but there are platforms that can do all that work for you.
Here are suggestions based on my experience while testing Restful APIs.
Make sure that you are validating proprietary headers if you are using with your APIs.
Confirm that you are including correct location header in the response so that Rest API caller can use that for verification or for subsequent calls.
Check that location header protocol is correct i.e as per your design. (http/https). It's very important for subsequent calls.
I have created a session with sandbox_mode = True, with all scopes, including request, using uber_rides python library. The api calls work fine, but I get duplicate request_ids for mutiple ride requests(fired one after the other, and not concurrent). Though these requests are using the same lat, longs and product_id. Can it be possible that uber creates a ride id using lat, long ?
Is this okay ? Or am I actually missing something, and this should never happen ?
I think the issue you might be running into is that if you are already on a trip and you try to create a new one, the API will just return the trip details for your current trip. So I think what is happening is you're creating one trip, then trying to create another and you're getting back a "processing" status so it looks like you created a new trips, but its actually still the first trip.
You can verify this by creating a trip, checking the UUID, canceling the trip, then requesting a new one and seeing if the UUID is different.
Best,
Riche
product_id is based on the start_latitude/start_longitude or start_place_id parameters.
request_id is not (it's just a UUID identifying the ride request)
If you are doing multiple ride requests with the same OAuth Bearer token and you do not cancel the first ongoing ride request you are basically getting back the status details of the current ongoing trip.
According to Uber Help - CAN I REQUEST MORE THAN ONE UBER?
At this time, it’s not possible to request more than one ride from a
single account.
If your party cannot be accommodated by a single vehicle, have
multiple people in your group request rides. We offer vehicle options
accommodating up to 6 people in many cities.
If no one else in your group has an Uber account, you can invite them
to sign up from the main menu of your app. As a bonus, both you and
your friend will receive the referral promotion.
This also applies to the Uber API.
However, from my use of the Uber API I've noticed the following rate limiting headers sent back on some responses:
X-Rate-Limit-Limit-Concurrent-Trips: 10
X-Rate-Limit-Remaining-Concurrent-Trips: 10
so they probably plan to add the possibility of making concurrent ride requests from the same Uber rider.
I'm prototyping a trip experience. In debug we have a button that requests an in_progress ride to work with. Everything seems to work ok.
However, a release build (hitting the real API rather than sandbox) I get no trips back.
We have requested: request and all_trips scope.
We have the test users' uber accounts added to the developer portal.
Requesting the scopes is working, we're takin to the site and it asks for the appropriate scopes, the app is listed in the user's profile.
Any ideas? Is there a region limitation, for example?
Could you provide some more details on the the exact flow you are following and what endpoints you are hitting?
If you make a GET request to nonsandbox /v1/requests/current with an access token for a user that is on a trip, what response do you get back?
I'm making a ride request via the Uber API. I successfully make a request and get a response that it's in the Processing state. I then open my Uber app to watch until it goes into the Accepted state, but it never gets there. After about 15 seconds of processing, it pops up with a weird error message that I've never seen before in the Uber app: "All vehicles are currently in use. Please call (206) 622-6500". I called the phone number just to see, and it's the number for Yellow Cab in Seattle.
I try to make a request using the Uber app as normal, and it works fine.
I'm not making my ride request using the API sandbox; I'm actually trying to request a ride for myself using the limited access request scope for my personal account.
There's not any code to associate with this since I'm making a request successfully. Uber API support has requested that I ask a question on StackOverflow instead of reaching out to them directly.