FileService :: GetFichiersLiesDocument

The GET method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • TypeDocument typeDocument,
  • string numeroDocument.

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

Input parameters:

{
"typeDocument":1,
"numeroDocument":"BC00102"
}

Example:

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

use services\WebServices100;

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

$data = new stdClass();
$data->typeDocument=1;
$data->numeroDocument="BC00102";

$json_data = json_encode($data, JSON_UNESCAPED_SLASHES);

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

$response = json_decode($result);

Result:

Array
(
    [0] => stdClass Object
        (
            [NumeroDocument] => BC00102
            [TypeDocument] => 1
            [Intitule] => xml defaut
            [NomFichier] => .\Multimedia\Default.xml
            [Id] => 3
            [Transmettre] => 0
            [TypeMime] => text\/xml
            [Createur] => COLU
            [DateModification] => /Date(1516023540000+0100)/
        )
    [1] => stdClass Object
        (
            [NumeroDocument] => BC00102
            [TypeDocument] => 1
            [Intitule] => Intitule de test
            [NomFichier] => .\Multimedia\tes!..._____tDoc.txt
            [Id] => 32
            [Transmettre] => 0
            [TypeMime] => text\/plain
            [Createur] => COLU
            [DateModification] => /Date(1517236080000+0100)/
        )
    [2] => stdClass Object
        (
            [NumeroDocument] => BC00102
            [TypeDocument] => 1
            [Intitule] => Intitule de test
            [NomFichier] => .\Multimedia\tes!..._____tDoc2.htm
            [Id] => 34
            [Transmettre] => 0
            [TypeMime] => text\/html
            [Createur] => W100
            [DateModification] => /Date(1517236080000+0100)/
        )
)