Quickstart
Hi NAME,
Welcome to the Solvice API! You can use our API to access Solvice API endpoints, which can get information on your solved jobs, their statuses and of course post new solve jobs.
Dashboard
First of all, get your account through our Dashboard and create an API key.
The dashboard will allow you to see your past requests and current usage of the Solver API.
Authorization
Add a HTTP header with your API key:
Authorization: <<apiKey>>
Quickstart
The Solvice API is super simple! Basically, it holds one /solve
endpoint for sending an asynchronous solve request to for a certain optimization problem and it holds one /jobs/:job_id/solution
endpoint for retrieving the solved job asynchronous. That's it! The only thing you have to manage is the actual payload for the solve request.
https api.solvice.io/demo/fill Authorization:<<apiKey>> | https api.solvice.io/v1/solve Authorization:<<apiKey>>
curl https://demo:[email protected]/demo/vrp | \
curl https://demo:[email protected]/v1/solve \
-X POST -H "Content-Type: application/json" -d @-
Common usage of the Solvice API follows this flow:
- Post a
/solve
request forx
seconds with HTTP param?seconds=x
. - Wait
x
seconds - Fetch the solution through
/jobs/:job_id/solution
. - If
score.feasible = false
, there is finer grained info at/stats/:job_id
Extra info for step 1 and 3
Step 1: To get an idea what this
/solve
request might look like, either build one up through the reference (listed options at Solve ) orGET
a/demo
endpoint, for which you can find instructions on the same page .Step 3: If the solver has reached
status = SOLVED
, solution info is available. If stillQUEUED
, refetch. An oversight of all statuses is available at Status .
Updated almost 2 years ago