Lookup Field Value Get
Overview
OpsHub will call this API for fields of type LOOKUP. Implementation of this API should return valid values that the user can set in a given lookup field.
API URI
GET: /metadata/fields/{fieldId}/values?projectId=<projectId>&entityTypeId=<entityTypeId>&fieldScope=<FieldScope>URI Parameters
entityTypeId
path
True
String
‘id’ of entity type returned as response of Entity Type – List API
fieldId
path
True
String
Id of the field, as sent by Connector SDK from /entity-types/{entityTypeId} API
projectId
query
True
String
Project id for which the list of entity types is available. ProjectId here will be the same as ‘id’ sent as part of /projects
FieldScope
query
True
ENUM
Scope where Lookup values for a field are to be displayed. - ENTITY_FIELD: Provide 'ENTITY_FIELD' when lookup values are to be displayed at mapping level. - CONFIG_FIELD: Provide 'CONFIG_FIELD' when lookup values are to be displayed at advanced integration configuration level in entity-level mandatory settings screen.
Response Payload
[
{
"id": "<id1>",
"value": "<value1>"
},
{
"id": "<id2>",
"value": "<value2>"
},
{
"id": "<id3>",
"value": "<value3>"
}
]Response Parameters
id
True
String
Internal value of the field. For example, for priority field: "low", "medium", and "high". If the end system does not have a different internal name for a field value, pass the display name here too.
value
True
String
Display value of the field. For example, for priority field: "Low", "Medium", and "High".
Examples
Sample response for priority field:
[
{
"id": "1",
"value": "High"
},
{
"id": "2",
"value": "Medium"
},
{
"id": "3",
"value": "Low"
}
]Sample response for priority field with same id and value:
[
{
"id": "High",
"value": "High"
},
{
"id": "Medium",
"value": "Medium"
},
{
"id": "Low",
"value": "Low"
}
]Last updated

