Skip to content

Instantly share code, notes, and snippets.

@rawaludin
Created November 30, 2018 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rawaludin/29172e786210dec5c8f3e1b970800085 to your computer and use it in GitHub Desktop.
Save rawaludin/29172e786210dec5c8f3e1b970800085 to your computer and use it in GitHub Desktop.
curl -X POST \
https://kong.poc-dev-us-east1.kw.com/intelligence/search-fields \
-H 'Authorization: Bearer JhF2z2XvsvqaIL70cqLjEV15_G4' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"domain": "sonny-test",
"properties": [
{
"name": "name",
"type": "string"
},
{
"name": "address.city",
"type": "string"
},
{
"name": "address.zip_code",
"type": "string"
},
{
"name": "address.state",
"type": "string"
},
{
"name": "address.country",
"type": "string"
},
{
"name": "address.home_coordinate",
"type": "geo_point"
},
{
"name": "address.land_area",
"type": "geo_shape"
}
],
"es_mappings": {
"name": {
"type": "text"
},
"address": {
"properties": {
"address": {
"properties": {
"city": {
"type": "text"
},
"zip_code": {
"type": "text"
},
"state": {
"type": "text"
},
"country": {
"type": "text"
},
"home_coordinate": {
"type": "geo_point"
},
"land_area": {
"type": "geo_shape"
}
}
}
}
}
}
}
}
'
@toopay
Copy link

toopay commented Nov 30, 2018

Fixed the configmap. This is the correct url @rawaludin : https://kong.poc-dev-us-east1.kw.com/intelligences/search-fields (noticed extra s there)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment