Previous Article | matchIT Hub Index | Next Article |
Resources relative to http://host:8080/matchITHub/engines/<engine>
REST resource | Summary |
---|---|
POST lookup | Look up a record. Form data: data=<data> ruleSet=<ruleSet> recordLimit=<recordLimit> minimumScore=<minimumScore> timeout=<timeout> |
GET tables/1/?data=<data> | Same as lookup |
POST lookup | Look up a record. Json: data={<json query>} |
POST /matchITHub/engines/<engine>/lookup data=<data>, recordLimit=<recordLimit>, minimumScore=<minimumScore>, timeout=<timeout>
Request
Type | Name | Description |
---|---|---|
PathParam | engine | The id of the engine to modify |
FormParam | data | A data record to lookup |
FormParam | ruleSet | see Configuration Guide - Matching Rule Sets |
FormParam | recordLimit | Maximum number of results to return (default 0 - no limit) |
FormParam | minimumScore | Minimum score of results to return (default 0) |
FormParam | timeout | Timeout in milliseconds (default 1000) |
Response
Name | Value | Description |
---|---|---|
count | <count> | Count of results |
result | <result records> | Array of result records |
Description
Equivalent to adding data to table 2 and repeatedly calling RESULTS/NEXT.
If it fails to lock the engine for timeout milliseconds you may get some empty strings in the results.
The count in the response is the number of matches that matchIT Hub found. If I record limit was specified the result array may contain fewer records.
Usage Example
Using cURL:
curl -X POST --data-urlencode "data=,,JOHN,TATTLE,,,BIRMINGHAM,,B3 3ER" http://localhost:8080/matchITHub/engines/1/lookup {"status":"OK","results":["\t4\tJOHN TATTLE\tINFORMATION SYSTEMS MANAGER\tFRINTON WILKES PLC\t12 NEWHALL STREET\tBIRMINGHAM\tWEST MIDLANDS\tB3 3ER\t\t5\t117\t0\t57\t57\t0\t0","\t13\tMR V MACNICHOLS\t\tWETHERALL CONSULTING\t31 DALE END\tBIRMINGHAM\tWEST MIDLANDS\t\tB4 7LH\t4\t27\t0\t27\t27\t0\t4","\t28\tMR G HOOD\t\tFRINTON WILKES PLC\t12 NEWHALL STREET\tBIRMINGHAM\tWEST MIDLANDS\tB3 3ER\t\t4\t57\t0\t57\t57\t0\t4","\t71\tMR J RATTLE\tIT MANAGER\tFRINTON WILKES LTD\tEDMUND HOUSE\t12 NEWHALL STREET\tBIRMINGHAM\tB3 3ER\t\t1\t97\t0\t57\t57\t0\t4"],"count":4}
GET /matchITHub/engines/<engine>/tables/1?data=<data>, recordLimit=<recordLimit>, minimumScore=<minimumScore>
Request
Type | Name | Description |
---|---|---|
PathParam | engine | The id of the engine to modify |
QueryParam | data | A data record to lookup |
QueryParam | ruleSet | see Configuration Guide - Matching Rule Sets |
QueryParam | recordLimit | Maximum number of results to return (default 0 - no limit) |
QueryParam | minimumScore | Minimum score of results to return (default 0) |
QueryParam | timeout | Timeout in milliseconds (default 1000) |
Response
Name | Value | Description |
---|---|---|
count | <count> | Count of results |
result | <result records> | Array of result records |
Description
Same as POST lookup. Equivalent to adding data to table 2 and repeatedly calling RESULTS/NEXT.
Usage Example
Using a browser:
POST /matchITHub/engines/<engine>/lookup data=<json query>
From version 2.0.4.
Request
Type | Name | Description |
---|---|---|
PathParam | engine | The id of the engine to modify |
JsonParam | data | A json query |
Response
Name | Value | Description |
---|---|---|
count | <count> | Count of results |
result | <result records> | Array of result records |
Description
Alternative version of POST lookup that takes json as input rather than form data. In the post header specify Content-Type: application/json rather than Content-Type: multipart/form-data
The json query can contain any of the column types specified in Configuration Guide - Appendix A - Column Types and the following:
Name | Description |
---|---|
recordLimit | Maximum number of results to return (default 0 - no limit) |
minimumScore | Minimum score of results to return (default 0) |
timeout | Timeout in milliseconds (default 1000) |
ruleSet | see Configuration Guide - Matching Rule Sets |
Prior to version 2.0.4.15 the "Array of result records" output was an array of delimited strings. Since verison 2.0.4.15 the "Array of result records" output is an array of json objects, see example below.
Usage Example
Using cURL:
Prior to version 2.0.4.15
curl -X POST -H "Content-Type: application/json" --data "{\"forenames\":\"JOHN\",\"surname\":\"TATTLE\",\"city\":\"BIRMINGHAM\",\"postcode\":\"B3 3ER\"}" http://localhost:8080/matchITHub/engines/lookup/lookup {"status":"OK","results":["\t4\tJOHN TATTLE\tINFORMATION SYSTEMS MANAGER\tFRINTON WILKES PLC\t12 NEWHALL STREET\tBIRMINGHAM\tWEST MIDLANDS\tB3 3ER\t\t5\t95\t0\t35\t35\t0\t0","\t73\tJ R MAGSON\tPROD MGR\tFRINTON WILKES LTD\tEDMUND HOUSE\t12/22 NEWHALL STREET\tBIRMINGHAM\tW MIDLANDS\tB3 3ER\t4\t35\t0\t35\t35\t0\t5","\t72\tMR F W BOWER\tMANAGING DIRECTOR\tFRINTON WILKES GROUP\tEDMUND HOUSE\t12/22 NEWHALL STREET\tBIRMINGHAM\tWEST MIDLANDS B3 3ER\t\t4\t35\t0\t35\t35\t0\t5","\t28\tMR G HOOD\t\tFRINTON WILKES PLC\t12 NEWHALL STREET\tBIRMINGHAM\tWEST MIDLANDS\tB3 3ER\t\t4\t35\t0\t35\t35\t0\t5","\t71\tMR J RATTLE\tIT MANAGER\tFRINTON WILKES LTD\tEDMUND HOUSE\t12 NEWHALL STREET\tBIRMINGHAM\tB3 3ER\t\t5\t75\t0\t35\t35\t0\t5"],"count":5}
Since version 2.0.4.15
curl -X POST -H "Content-Type: application/json" --data "{\"surname\": \"CHILVERS\"}" http://localhost:8080/matchITHub/engines/lookup/lookup { "status":"OK", "results":[ { "uniqueref":"1", "fullname":"MR G K CHILVERS", "jobtitle":"LASER MANAGER", "organization":"STANTON COPSHAW DIRECT", "address1":"10 EAGLES WOOD BUSINESS PARK", "address2":"ALMONDSBURY", "address3":"", "address4":"BRISTOL", "postcode":"BS12 4EU", "levels":"13", "individualScores":{ "totalScore":"55", "nameScore":"40", "organizationScore":"0", "addressScore":"5", "postcodeScore":"10" }, "familyScores":{ "totalScore":"0", "nameScore":"", "organizationScore":"", "addressScore":"", "postcodeScore":"" }, "addressScores":{ "totalScore":"15", "nameScore":"0", "organizationScore":"0", "addressScore":"5", "postcodeScore":"10" }, "businessScores":{ "totalScore":"30", "nameScore":"0", "organizationScore":"15", "addressScore":"5", "postcodeScore":"10" }, "customScores":{ "totalScore":"0", "nameScore":"", "organizationScore":"", "addressScore":"", "postcodeScore":"" }, "key":"1" } ], "count":1 }
Previous Article | matchIT Hub Index | Next Article |