Get Lookup Records
Retrieves record list belonging to the specified lookup.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
GET /api/sonar/lookups/:guid/records
Request Parameters
| Key | Required | Type | Description | Notes |
|---|---|---|---|---|
| guid | Y | String | Lookup GUID | 36 characters |
| offset | N | 32-bit integer | Number to skip | Default: 0 |
| limit | N | 32-bit integer | Maximum count | Default: 20 if not specified |
| keywords | N | String | Search keywords | Searches across all record fields |
Success Response
HTTP status code 200 response
{
"total_count": 236,
"fields": ["country", "name"],
"records": [
["AE", "United Arab Emirates"],
["AF", "Afghanistan"],
["AG", "Antigua and Barbuda"],
["AI", "Angola"],
["AL", "Albania"],
["AM", "Armenia"],
["AN", "Antilles"],
["AO", "Angola"],
["AQ", "Antarctica"],
["AR", "Argentina"],
["AS", "American Samoa"],
["AT", "Austria"],
["AU", "Australia"],
["AW", "Aruba"],
["AZ", "Azerbaijan"],
["BA", "Bosnia and Herzegovina"],
["BB", "Barbados"],
["BD", "Bangladesh"],
["BE", "Belgium"],
["BF", "Burkina Faso"]
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| total_count | 32-bit integer | Total number of lookup records matching criteria |
| fields | Array | Field name list |
| records | Array | Record list |
Error Responses
offset, limit: non-integer values
HTTP status code 400 response
{
"error_code": "invalid-argument",
"error_msg": "'offset' parameter should be int type"
}
offset, limit: negative values
HTTP status code 400 response
{
"error_code": "invalid-argument",
"error_msg": "'offset' must be greater than or equal to 0."
}
permission: no lookup record viewing permission
HTTP status code 500 response
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}