anchor.diff:  % Private stuff
   
   validate_request(Req) ->
  -    { Command, NodeNames, _RunTimeout, _Quorum } = parse_post_body(Req),
  -    validate_command(Command),
  -    validate_nodes(NodeNames).
  +    Body = wrq:req_body(Req),
  +    JobJson = jiffy:decode(Body),
  +
  +    validate_keys(JobJson),
  +    validate_command(ej:get({<<"command">>}, JobJson)),
  +    validate_nodes(ej:get({<<"nodes">>}, JobJson)).
   
   validate_command(Command) ->
       case Command of
  
positive.code:         true -> true
      end.
  
  
  parse_post_body(Req) ->
      Body = wrq:req_body(Req),
  
negative.code:             {{halt, 400}, Req1, State};
          throw:no_nodes ->
              Msg = <<"at least one node must be supplied">>,
              Req1 = wrq:set_resp_body(jiffy:encode({[{<<"error">>, Msg}]}), Req),
              {{halt, 400}, Req1, State};
          throw:bad_key ->
              Msg = <<"invalid key supplied">>,
              Req1 = wrq:set_resp_body(jiffy:encode({[{<<"error">>, Msg}]}), Req),
              {{halt, 400}, Req1, State}
      end.
  