Requesting my server

If you don’t want to install the simulator on your server, try mine. It’s up 24/7, but no promises of course concerning either its availability or accuracy.

Solve a puzzle

To keep the bots out, my server expects a “token”: the name of the French physicist who discovered the heat pump effect in the early nineteenth century. Google to find his or her full name, form a non-accented character string <token> from it in lower case without spaces and add it as a top level element to your request:

{
  . . .
  "token": "<token>",
  . . .
}

To receive an e-mail when your results are ready, add your e-mail address <email> as a top level element as follows:

{
  . . .
  "email": "<email>",
  . . .
}

Make a request

POST your json request to:

https:://renewable-visions.com/wp-json/api/projection

You should receive a json response immediately, telling you whether your request has succeed or failed.

Fixing errors

If your request has an error, the server will respond with 400 Bad request and a json diagnostic, for example:

{
    "message": "'storage_hot_water' component is missing"
}

Keep fixing your errors your request is accepted and you see .

Successful request

If your request is successful, the server will respond 201 Created and a message with the url to your results:

{
    "message": "Get your result at <url>. Will e-mail you when ready at <email>.",
    "request": {
        ....
     }
}

The response also contains a copy of your request. If you omitted optional parameters, it will include assumptions made in their absence.

Simulations can take several minutes to run, or longer if the server has a queue of requests.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *