The REST API provides the following methods to perform lookups against a lookup table on the Rhapsody engine:
POST /api/lookuptable/lookup
URI |
|
---|---|
Description |
Performs a single lookup against a table in Rhapsody, returning the first matching row. Refer to LookupTable Object for details. |
Request Header |
|
Accept: application/vnd.orchestral.rhapsody.6_1+json |
|
Request Body |
{ "table":"my_table", "queryColumns":[ {"name":"a","value":"1"}, {"name":"b","value":"11"} ], "returnColumn":"c" } |
Response Status |
|
Response Body |
A list of lookup results:
{ "data":[ {"name":"c","value":"12"} ], "error": null } |
Access Rights |
'Perform lookup REST API'. |
POST /api/lookuptable/lookupall
URI | POST /api/lookuptable/lookupall |
---|---|
Description | Performs a lookup against a table in Rhapsody, returning all matching rows (subject to an optional limit). Refer to LookupTable Object for details. |
Request Header |
|
|
|
Request Body | The request body has the following structure: { "table":"my_table", "queryColumns":[ {"name":"a","value":"1"}, {"name":"b","value":"11"} ], "returnColumns":["b", "c"], "sortColumns":[{"name":"b", "sortOrder":"Ascending"}], "limit":10 } The sort order is case-sensitive. |
Response Status | 200 OK - operation successful. |
Response Body | A list of lookup results:
{ "data":[ [ {"name":"b","value":"11"}, {"name":"c","value":"111"} ], [ {"name":"b","value":"11"}, {"name":"c","value":"222"} ], [ {"name":"b","value":"11"}, {"name":"c","value:"333"} ] ], "error": null } |
Access Rights | 'Perform lookup REST API'. |