Avatar

diagnosticSearch

0

I am creating a backend for the Diagnostic and  using Typename " Diagnostic " to get the Diagnostic list of the name's like 

"name" => "Tire%",
"name" => "TPMS fault - battery low",
"name" => "Tire pressure fault%",
"name" => "Tire pressure fault - extreme over pressure",
"name" => "Tire pressure fault - extreme under pressure",
"name" => "Tire pressure fault - under pressure",
"name" => "tire temperature fault - over temperature",
"name" => "Tire fault - leak detected",
"name" => "Tire fault - missing sensor",
"name" => "**Unknown Diagnostic 369",
"name" => "**Unknown Diagnostic 39093",

My query is how can i use multiple name or array in search in the below api call. the api call search the data only base on latest name that is "**Unknown Diagnostic 39093"

array("method" => GEOTAB_METHOD_GET,
"params" => array(
"typeName" => GEOTAB_TYPENAME_DIAGNOSTIC,
"resultsLimit" => 2000,
"fromVersion" => "0000000000000000",
"search" => array(
"name" => "Tire%", //"%Low priority warning light%",
"name" => "TPMS fault - battery low",
"name" => "Tire pressure fault%",// "fromDate" => "2015-11-17T07:07:41.789Z",
"name" => "Tire pressure fault - extreme over pressure",
"name" => "Tire pressure fault - extreme under pressure",
"name" => "Tire pressure fault - under pressure",
"name" => "tire temperature fault - over temperature",
"name" => "Tire fault - leak detected",
"name" => "Tire fault - missing sensor",
"name" => "**Unknown Diagnostic 369",
"name" => "**Unknown Diagnostic 39093",
"id" => "aiHdn4anAHkiCxiG3Yh19Og"
),
"credentials" => array(
"database" => $this->common->geotabApiDatabase,
"password" => $this->common->geotabApiPassword,
"userName" => $this->common->geotabApiUserName,
),
));

Thanks in advance

harsh choudhary

Iniciar sesión para dejar un comentario.

1 comentario

0
Avatar

Hello Harsh,

When searching for a specific Diagnostic using the DiagnosticSearch object, you can only specify one "name" for the diagnostic in a single call.

The search object only expects one value for the name property and hence, it always searched by the last valid diagnostic name in your example.

If you want to search for multiple diagnostic names, you will have to make a separate call for each one, unless they can be grouped together using a wildcard. You can find more information on DiagnosticSearch object and its properties here.

Shivansh Singla 0 votos