Get Lookup Schemas
Retrieves the lookup schema list matching search criteria. This operation requires administrator role.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
GET /api/sonar/lookups
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/lookups
Request Parameters
| Key | Required | Type | Description | Notes |
|---|---|---|---|---|
| offset | N | 32-bit integer | Number to skip | Default: 0 |
| limit | N | 32-bit integer | Maximum count | Retrieves all if not specified |
| keywords | N | String | Search keywords | Searches in name, description, and query fields |
Success Response
HTTP status code 200 response
{
"total_count": 17,
"lookups": [
{
"guid": "76b8699d-91a1-4576-a908-7db753570a0a",
"name": "country_code",
"description": "Country code to Korean name mapping",
"record_count": 236,
"fields": [
{
"field_name": "country",
"len": 2,
"use_null": false
},
{
"field_name": "name",
"len": 255,
"use_null": false
}
],
"created": "2023-09-23 17:13:15+0900",
"updated": "2023-09-23 17:13:15+0900"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| total_count | 32-bit integer | Total count of lookups matching search criteria |
| lookups | Array | Paginated lookup list |
| lookups[].guid | String | Lookup GUID |
| lookups[].name | String | Lookup name |
| lookups[].description | String | Lookup description |
| lookups[].record_count | 32-bit integer | Number of records in the lookup |
| lookups[].fields | Array | Field definition list |
| lookups[].fields[].field_name | String | Field name |
| lookups[].fields[].len | 32-bit integer | Maximum value length |
| lookups[].fields[].use_null | Boolean | Whether empty values are allowed |
| lookups[].created | String | Creation date/time (yyyy-MM-dd HH:mm:ssZ format) |
| lookups[].updated | String | Modification date/time (yyyy-MM-dd HH:mm:ssZ format) |
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 viewing permission
HTTP status code 500 response
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}