24 lines
664 B
PHP
24 lines
664 B
PHP
<?php
|
|
require_once "class/VisualLimsApiClient.class.php";
|
|
include('include/headscript.php');
|
|
|
|
header("Content-Type: application/json; charset=utf-8");
|
|
|
|
try {
|
|
$api = VisualLimsApiClient::getInstance();
|
|
|
|
$commessaId = 577818;
|
|
|
|
$endpoint = "CommessaWeb({$commessaId})?\$expand=CommesseCustomFields(\$expand=CustomField)";
|
|
|
|
$result = $api->get($endpoint);
|
|
|
|
echo json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
|
} catch (Exception $e) {
|
|
http_response_code(500);
|
|
echo json_encode([
|
|
"success" => false,
|
|
"error" => $e->getMessage()
|
|
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
|
}
|