Nextmv Cloud API (0.0.0-alpha)

The Cloud API serves as a quick-and-easy demonstration of Hop's solving capabilities for optimizing routes for a fleet of vehicles.

Server

URL
https://api.cloud.nextmv.io

Authentication

bearer

All requests to the API should include a basic Authorization header that references a API Token. For example, Aladdin's requests to the Nextmv API should all include the following header: Authorization: Bearer YWxhZGRpbjpvcGVuc2VzYW1l.

create a new run

post/v0/run

Create a new run

Responses

202 Error

search results matching criteria

400 Error
401 Error

unauthorized

404 Error

Response Schema

runID string

Example: YOUR-RUN-UUID-HERE

Request
curl --request POST \
  --url https://api.cloud.nextmv.io/v0/run \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"options":{"solver":{"diagram":{"width":0,"expansion":{"limit":0}},"limits":{"duration":"string","solutions":0,"nodes":0}}},"defaults":{"vehicles":{"start":{"lon":-180,"lat":-90},"end":{"lon":-180,"lat":-90},"speed":0,"capacity":0,"shift_start":"2019-08-24T14:15:22Z","shift_end":"2019-08-24T14:15:22Z","compatibility_attributes":["string"]},"stops":{"unassigned_penalty":0,"quantity":0,"hard_window":["2019-08-24T14:15:22Z"],"stop_duration":0,"target_time":"2019-08-24T14:15:22Z","earliness_penalty":0,"lateness_penalty":0,"compatibility_attributes":["string"]}},"vehicles":[{"start":{"lon":-180,"lat":-90},"end":{"lon":-180,"lat":-90},"speed":0,"capacity":0,"shift_start":"2019-08-24T14:15:22Z","shift_end":"2019-08-24T14:15:22Z","compatibility_attributes":["string"],"id":"string"}],"stops":[{"id":"string","position":{"lon":-180,"lat":-90},"unassigned_penalty":0,"quantity":0,"precedes":"string","hard_window":["2019-08-24T14:15:22Z"],"stop_duration":0,"target_time":"2019-08-24T14:15:22Z","earliness_penalty":0,"lateness_penalty":0,"compatibility_attributes":["string"]}]}'
Response

get a run status

get/v0/run/{run_id}/status

Path Parameters

run_id string *

Example: YOUR-RUN-UUID-HERE

Responses

200 Success

run status

400 Error
404 Error

Response Schema

status string

Example: succeeded|failed

Request
curl --request GET \
  --url https://api.cloud.nextmv.io/v0/run/%7Brun_id%7D/status \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json'
Response

get a run result

get/v0/run/{run_id}/result

Path Parameters

run_id string *

Example: YOUR-RUN-UUID-HERE

Responses

200 Success

run result

400 Error
404 Error

Response Schema

hop object *
options object *
state object *
statistics object *
Request
curl --request GET \
  --url https://api.cloud.nextmv.io/v0/run/%7Brun_id%7D/result \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json'
Response