DossierService :: GetExerciceByDate

The POST method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • DateTime date.

Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).

Input parameters:

{"date":"\/Date(1420066800000+0100)\/"}

Example:

require (__DIR__ . '/service/WebServices100.php');

use services\WebServices100;

$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/DossierService/rest/GetExerciceByDate';

// add parameters date(use timestamp format)
$data = new stdClass();
$data->date = "/Date(" . date(1420066800000) ."+0100)/";

$json_data = json_encode($data);

// Send requests to receive data
$result = WebServices100::getData($url, $json_data);

$response = json_decode($result);

Result:

stdClass Object
(
    [Debut] => /Date(1420059600000+0300)/
    [Fin] => /Date(1451595599999+0300)/
    [EstCloturee] => 
)