Method: GET
curl http://localhost:8000/create
Responses:
Status: 200 OK
Created clingo solver.
{
"type": "InternalError",
"msg": "Solver::create failed! Solver still running!"
}
Method: GET
curl http://localhost:8000/register_dl_theory
Responses:
Status: 200 OK
Difference logic theory registered.
{
"type": "InternalError",
"msg": "Solver::register_dl_theory failed! DLTheory already registered."
}
{
"type": "InternalError",
"msg": "Solver::register_dl_theory failed! Solver has been already started."
}
Method: POST
curl -i -XPOST http://localhost:8000/add --header 'content-type:text/plain' --data 'p:-not q. q :- not p.'
Responses:
Status: 200 OK
Added data to Solver.
{
"type": "InternalError",
"msg": "Solver::add failed! No control object."
}
{
"type": "InternalError",
"msg": "Solver::add failed! Solver has been already started."
}
{
"type": "ClingoError",
"msg": "InternalError: Call to clingo_control_add() failed, code: Runtime, last: too many messages."
}
Method: GET
curl http://localhost:8000/ground
Responses:
Status: 200 OK
Grounding.
{
"type": "InternalError",
"msg": "Solver::ground failed! Solver has been already started."
}
Method: GET
curl http://localhost:8000/solve
Responses:
Status: 200 OK
Solving.
{
"type": "InternalError",
"msg": "Solver::solve failed! Solving has already started."
}
Method: GET
curl http://localhost:8000/model
Responses:
Status: 200 OK
Running.
{"Model":[113,10]}
Done
{
"type": "InternalError",
"msg": "Solver::model failed! Solving has not yet started."
}
Method: GET
curl http://localhost:8000/resume
Responses:
Status: 200 OK
Search is resumed.
{
"type": "InternalError",
"msg": "Solver::solve failed! Solving has already started."
}
Method: GET
curl http://localhost:8000/close
Responses:
Status: 200 OK
Solve handle closed.
{
"type": "InternalError",
"msg": "Solver::close failed! Solving has not yet started."
}