Interacting with CrocoTime Web API

Interaction with the time tracking software is performed by HTTP-requests to a Crocotime server. Any request should have the following strucutre:

session=[session]&controller=[name_of_controller]&query=[parameters]

A request with header containing Content-Type must either be of application/json type or be encoded:

- to use encodeURIComponent the URI-Encoding: 1 header must be sent;
- otherwise escape must be used.

Description of parameters of a request:

sessiona session id which is received as a reply to a request to LogonController — which requires no session;
controllera name of the controller to which the request is sent. This parameter should always be specified;
queryparameters for the controller. This parameter should be in JSON format.

Examlpe:

controller=employee_grouping&session=
b5688421d36ef89a7c03a19cd971a02029468e03b21fbf42dc55a63f1811c547&
query=
{
"is_write_items":1
}

The server only supports ASCII encoding therefore any parameters of a request containing UTF-8 characters must be encoded. Example:

(Javascript): escape(‘{«is_write_items»:1}’)