Get Sandbox Run
GEThttps://sandbox-api.uber.com/v1/guests/sandbox/run/{run_id}
¶ Use case
Use this endpoint to retrieve a mock run’s set of driver_ids
.
Wait 1 minute after calling /v1/guests/sandbox/run before calling this.
¶ Authorization
OAuth 2.0 Bearer token with the guests.trips
scope.
¶ Request
¶ Example request
curl -X GET \
-H "authorization: Bearer <access_token>" \
'https://sandbox-api.uber.com/v1/guests/sandbox/run/<run_id>'
¶ Request URL parameters
URL parameter | Type | Description |
---|---|---|
run_id |
string |
A unique identifier of a sandbox create run request (required). |
¶ Response
¶ Example response
{
"run_id": "<run_id>",
"driver_ids": ["<driver_id>", "<driver_id>"]
}
¶ Response body parameters
Field | Type | Description |
---|---|---|
run_id |
string |
A unique identifier of a sandbox run. |
driver_ids |
array |
List of driver IDs. |
driver_id |
string |
A driver ID is used to change the driver’s state via /v1/guests/sandbox/driver-state. |
¶ Errors
This endpoint can return an error if the run_id
is not found, which usually happens if you wait less than a minute after calling /v1/guests/sandbox/run, or if there was an error when creating the run.
{
"message": "RunID is not valid",
"metadata": {
"statusCode": "404"
},
"code": "entity_not_found"
}
In this scenario, run_id is critically failed and cannot be used, requiring the creation of a new one.
{
"code": "internal_server_error",
"message": "We have experienced a problem."
}
In this scenario, it is necessary to wait for the run to finish initializing, usually in 10 seconds, the driver will automatically be available ONLINE for 5 minutes and can receive trips.
{
"message": "RunID interactive-2d73c91a-60f1-438f-82ed-57b3011c1ec1 on orchestrator is in state initialized",
"metadata": {
"statusCode": "400"
},
"code": "invalid_request_parameters"
}