Spaces method and path for this operation:
get /s/{space_id}/api/data_views/data_view/{viewId}/runtime_field/{fieldName}
Refer to Spaces for more information.
Retrieve a single runtime field by name from a data view.
GET
/api/data_views/data_view/{viewId}/runtime_field/{fieldName}
curl
curl \
-X GET "${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}/runtime_field/${FIELD_NAME}" \
-H "Authorization: ApiKey ${API_KEY}"
GET kbn://api/data_views/data_view/{viewId}/runtime_field/{fieldName}
Response examples (200)
The runtime field definition along with the parent data view.
{
"data_view": {
"allowNoIndex": false,
"fieldAttrs": {},
"fieldFormats": {
"AvgTicketPrice": {
"id": "number",
"params": {
"pattern": "$0,0.[00]"
}
},
"hour_of_day": {
"id": "number",
"params": {
"pattern": "00"
}
}
},
"fields": {
"_id": {
"aggregatable": false,
"count": 0,
"esTypes": [
"_id"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "_id",
"readFromDocValues": false,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"_index": {
"aggregatable": true,
"count": 0,
"esTypes": [
"_index"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "_index",
"readFromDocValues": false,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"_score": {
"aggregatable": false,
"count": 0,
"format": {
"id": "number"
},
"isMapped": true,
"name": "_score",
"readFromDocValues": false,
"scripted": false,
"searchable": false,
"shortDotsEnable": false,
"type": "number"
},
"_source": {
"aggregatable": false,
"count": 0,
"esTypes": [
"_source"
],
"format": {
"id": "_source"
},
"isMapped": true,
"name": "_source",
"readFromDocValues": false,
"scripted": false,
"searchable": false,
"shortDotsEnable": false,
"type": "_source"
},
"AvgTicketPrice": {
"aggregatable": true,
"count": 0,
"esTypes": [
"float"
],
"format": {
"id": "number",
"params": {
"pattern": "$0,0.[00]"
}
},
"isMapped": true,
"name": "AvgTicketPrice",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
},
"Cancelled": {
"aggregatable": true,
"count": 0,
"esTypes": [
"boolean"
],
"format": {
"id": "boolean"
},
"isMapped": true,
"name": "Cancelled",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "boolean"
},
"Carrier": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "Carrier",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"dayOfWeek": {
"aggregatable": true,
"count": 0,
"esTypes": [
"integer"
],
"format": {
"id": "number"
},
"isMapped": true,
"name": "dayOfWeek",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
},
"Dest": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "Dest",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"DestAirportID": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "DestAirportID",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"DestCityName": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "DestCityName",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"DestCountry": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "DestCountry",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"DestLocation": {
"aggregatable": true,
"count": 0,
"esTypes": [
"geo_point"
],
"format": {
"id": "geo_point",
"params": {
"transform": "wkt"
}
},
"isMapped": true,
"name": "DestLocation",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "geo_point"
},
"DestRegion": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "DestRegion",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"DestWeather": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "DestWeather",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"DistanceKilometers": {
"aggregatable": true,
"count": 0,
"esTypes": [
"float"
],
"format": {
"id": "number"
},
"isMapped": true,
"name": "DistanceKilometers",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
},
"DistanceMiles": {
"aggregatable": true,
"count": 0,
"esTypes": [
"float"
],
"format": {
"id": "number"
},
"isMapped": true,
"name": "DistanceMiles",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
},
"FlightDelay": {
"aggregatable": true,
"count": 0,
"esTypes": [
"boolean"
],
"format": {
"id": "boolean"
},
"isMapped": true,
"name": "FlightDelay",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "boolean"
},
"FlightDelayMin": {
"aggregatable": true,
"count": 0,
"esTypes": [
"integer"
],
"format": {
"id": "number"
},
"isMapped": true,
"name": "FlightDelayMin",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
},
"FlightDelayType": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "FlightDelayType",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"FlightNum": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "FlightNum",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"FlightTimeHour": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "FlightTimeHour",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"FlightTimeMin": {
"aggregatable": true,
"count": 0,
"esTypes": [
"float"
],
"format": {
"id": "number"
},
"isMapped": true,
"name": "FlightTimeMin",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
},
"hour_of_day": {
"aggregatable": true,
"count": 0,
"esTypes": [
"long"
],
"format": {
"id": "number",
"params": {
"pattern": "00"
}
},
"name": "hour_of_day",
"readFromDocValues": false,
"runtimeField": {
"script": {
"source": "emit(doc['timestamp'].value.getHour());"
},
"type": "long"
},
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
},
"Origin": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "Origin",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"OriginAirportID": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "OriginAirportID",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"OriginCityName": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "OriginCityName",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"OriginCountry": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "OriginCountry",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"OriginLocation": {
"aggregatable": true,
"count": 0,
"esTypes": [
"geo_point"
],
"format": {
"id": "geo_point",
"params": {
"transform": "wkt"
}
},
"isMapped": true,
"name": "OriginLocation",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "geo_point"
},
"OriginRegion": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "OriginRegion",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"OriginWeather": {
"aggregatable": true,
"count": 0,
"esTypes": [
"keyword"
],
"format": {
"id": "string"
},
"isMapped": true,
"name": "OriginWeather",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "string"
},
"timestamp": {
"aggregatable": true,
"count": 0,
"esTypes": [
"date"
],
"format": {
"id": "date"
},
"isMapped": true,
"name": "timestamp",
"readFromDocValues": true,
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "date"
}
},
"id": "d3d7af60-4c81-11e8-b3d7-01146121b73d",
"name": "Kibana Sample Data Flights",
"runtimeFieldMap": {
"hour_of_day": {
"script": {
"source": "emit(doc['timestamp'].value.getHour());"
},
"type": "long"
}
},
"sourceFilters": [],
"timeFieldName": "timestamp",
"title": "kibana_sample_data_flights",
"version": "WzM2LDJd"
},
"fields": [
{
"aggregatable": true,
"count": 0,
"esTypes": [
"long"
],
"name": "hour_of_day",
"readFromDocValues": false,
"runtimeField": {
"script": {
"source": "emit(doc['timestamp'].value.getHour());"
},
"type": "long"
},
"scripted": false,
"searchable": true,
"shortDotsEnable": false,
"type": "number"
}
]
}