To monitor the tool functionality more effectively than over their entry page we provide simple API snippets in different programming languages that can be integrated into your web-server. The API endpoint computes and returns the digit sum for the "input" parameter provided as a GET request. This endpoint will only be queried with valid input values.



const http = require('http');
const url = require('url');

http.createServer(function (req, res) {
  res.writeHead(200, {"Content-Type": "text/plain"});
  var input = url.parse(req.url, true).query.input;
  res.end(input ? input.toString().split("").map(Number).reduce(
    (a, b) => a + b, 0).toString() : "NaN");
}).listen(8080);




Open API Example: