Get Lookup
Returns the details of a single lookup for the specified GUID. To list every lookup, use the Get Lookups API.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
GET /api/sonar/lookups/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/lookups/76b8699d-91a1-4576-a908-7db753570a0a
Request Parameters
Path Parameters
| Key | Type | Description | Note |
|---|---|---|---|
| guid | String | Lookup GUID | 36 characters |
Success Response
{
"lookup": {
"guid": "76b8699d-91a1-4576-a908-7db753570a0a",
"name": "country_code",
"description": "Country-code-to-localized-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"
}
}
- lookup (Map): Lookup details.
nullwhen no lookup exists for the specified GUID- guid (String): Lookup GUID
- name (String): Lookup name
- description (String): Lookup description
- record_count (64-bit integer): Number of records in the lookup
- fields (Array): Field definitions
- field_name (String): Field name
- len (32-bit integer): Maximum length of the value
- use_null (Boolean): Whether empty values are allowed
- created (String): Date and time of creation (
yyyy-MM-dd HH:mm:ssZ) - updated (String): Date and time of last modification (
yyyy-MM-dd HH:mm:ssZ)
Error Responses
Identifier is not in valid GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "guid should be guid type."
}
Permission denied
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}