QueryRecords Functions
The QueryRecords function creates a query that enables you to run a search through the Windchill Risk and Reliability database and return a list of records that matches the query.
Syntax
The following is the syntax for an HTTP request:
POST /WindchillRiskandReliability12.0/DataEngine.asmx/QueryRecords HTTP/1.1
Host: HostName
Content-Type: application/x-www-form-urlencoded
Content-Length: length

UserName=string&Password=string&GroupName=string&ProjectName=string
&SearchText=string&FieldsToSearchList=string&SearchConstraintsList=string&
ExtraFieldsToReturnList=string
Parameters
In addition to login parameters, the QueryRecordsfunction uses these parameters:
ProjectName—The name of the Windchill Risk and Reliability Project. This value is case-sensitive.
SearchText—The whole or partial keyword associated with the object in the database.
FieldsToSearchList—The table name and the column names through which the search query should be run.
SearchConstraintsList—The constraint or limit within which the search should be executed.
ExtraFieldsToReturnList—The additional fields from database to return in search result.
The following is an example of an HTTP POST request:
POST /WindchillRiskandReliability12.0/DataEngine.asmx/QueryRecords HTTP/1.1
Host: HostName
Content-Type: application/x-www-form-urlencoded
Content-Length: length
UserName=admin&Password=passwd&GroupName=Administrators&ProjectName=Tablet PC&
SearchText=Sold&FieldsToSearchList={"System":["Name", "Description"]}
&SearchConstraintsList=[{"Field":{"FieldName":"FMEAType","TableName":"System"},
"ConstraintString":"Process"}]&ExtraFieldsToReturnList={"System":["Manufacturer"]}
Returns
If the user is authenticated and the specified parameter values are found, the function returns all rows from Process FMEA - FMEA Tree Table containing the keyword ‘Sold’ text in their Name or Descriptions columns. The records are returned in JSON format.
<?xml version="1.0" encoding="utf-8"?>
<DataEngineResponse xmlns="http://tempuri.org/">
<Success>true</Success>
<AdditionalData>{"Record1":{"TreeID":"1026","Name":"Solder","Description":"",
"RecordID":"1026","SystemName":"Tablet PC","Project":"Tablet PC Sample","Manufacturer":"",
"TableType":"System"}}</AdditionalData>
</DataEngineResponse>
If the call fails, the AdditionalData tag provides the reason for the failure.