Skip to main content
Version: 2.0

Search X Showme

Showmes allow dynamic APIs to be created using Elasticsearch queries. They support the most common REST methods and return data translated from the Elasticsearch query as JSON. Showmes can be secured to perform authentication and authorization challenges using Geequel. Use these endpoints to create a custom search query API.

Creates a new search query showme or updates an existing one.

Base URL: /1.0/search/{{clusterName}}/updateSearch/{{pathOrShowmeGrn}}
Method: PUT

ParameterDescription
clusterName stringThe GraphGrid Cluster with an Index Policy.
pathOrShowmeGrn stringThe path name of the showme or the showme grn

Request

curl --location --request PUT "${API_BASE}/1.0/search/default/updateSearch/testSearch" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--data-raw '{
"searchQuery" : "{ \"indexes\": [ \"person\" ], \"size\": <size>, \"from\": <from>, \"query\": { \"queryType\": \"queryString\", \"queryString\": \"<testSearch>\", \"ignoreQueryStringSyntax\": true, \"fuzziness\": 2, \"fuzzyPrefixLength\": 0, \"fuzzyMaxExpansions\": 50 } }",
"showmeMethod" : "GET",
"showmePath" : "/testSearch",
"showmeDisplayValue" : "Test Search",
"showmeDefinition" : "Test Search",
"showmePopulatorDisplayValue" : "Test Search",
"showmePopulatorDefinition" : "Test Search",
"nodeTypeGrns" : [ ],
"params" : { "size":10,"from":0, "testSearch": "" }
}'
Response
{
"showme": {
"id": 46,
"labels": [],
"enver": 0,
"createdAt": "2021-03-16T13:47:45.24Z",
"updatedAt": "2021-03-16T13:47:45.24Z",
"createdBy": "graphgrid",
"lastModifiedBy": "graphgrid",
"grn": "grn:gg:graphgridshowme:DqiDe7qjhcleZbsTQI97Xf8iZJCO43KJy2g6ya3DRI8O",
"key": "GET /pathOrGrn:testSearch",
"method": "GET",
"path": "/pathOrGrn:testSearch",
"definition": "Test Search",
"displayValue": null,
"order": null,
"disableUserRoleRequirement": null,
"nodeTypes": [],
"showmePopulator": null,
"securityRules": null,
"grnType": "graphgridshowme",
"label": "GraphGridShowme"
},
"populator": {
"id": 45,
"labels": [],
"enver": 0,
"createdAt": "2021-03-16T13:47:45.186Z",
"updatedAt": "2021-03-16T13:47:45.286Z",
"createdBy": "graphgrid",
"lastModifiedBy": "graphgrid",
"grn": "grn:gg:graphgridshowmepopulator:qlAZVVElAhkabTAzajSTjCfsiEEUprmQkKTOlHQfGGir",
"cypher": null,
"displayValue": "Test Search",
"definition": "Test Search",
"requiredParameters": null,
"searchQuery": "{ \"indexes\": [ \"person\" ], \"size\": <size>, \"from\": <from>, \"query\": { \"queryType\": \"queryString\", \"queryString\": \"<testSearch>\", \"ignoreQueryStringSyntax\": true, \"fuzziness\": 2, \"fuzzyPrefixLength\": 0, \"fuzzyMaxExpansions\": 50 } }",
"successRoutes": null,
"failureRoutes": null,
"conditionalSuccessRoutes": null,
"conditionalFailureRoutes": null,
"parameters": [],
"snippets": null,
"snippetImpls": null,
"cypherOrder": null,
"grnType": "graphgridshowmepopulator",
"label": "GraphGridShowmePopulator"
},
"parameters": [
{
"id": 261,
"labels": [],
"enver": 0,
"createdAt": "2021-03-16T13:47:45.231Z",
"updatedAt": "2021-03-16T13:47:45.231Z",
"createdBy": "graphgrid",
"lastModifiedBy": "graphgrid",
"grn": "grn:gg:graphgridshowmeparameter:M63TKtg6va813C7UcQjKb3vRaFjNupht2mYAk5LzCT50",
"type": "java.lang.String",
"key": "testSearch",
"value": "",
"encryption": null,
"grnType": "graphgridshowmeparameter",
"label": "GraphGridShowmeParameter"
},
{
"id": 44,
"labels": [],
"enver": 0,
"createdAt": "2021-03-16T13:47:45.218Z",
"updatedAt": "2021-03-16T13:47:45.218Z",
"createdBy": "graphgrid",
"lastModifiedBy": "graphgrid",
"grn": "grn:gg:graphgridshowmeparameter:KhUG4YlDfTo3QFm6rnnDBRq3KtZVSLFRKNPbIgJPldJt",
"type": "java.lang.Integer",
"key": "from",
"value": 0,
"encryption": null,
"grnType": "graphgridshowmeparameter",
"label": "GraphGridShowmeParameter"
},
{
"id": 260,
"labels": [],
"enver": 0,
"createdAt": "2021-03-16T13:47:45.201Z",
"updatedAt": "2021-03-16T13:47:45.201Z",
"createdBy": "graphgrid",
"lastModifiedBy": "graphgrid",
"grn": "grn:gg:graphgridshowmeparameter:1EidWKeJbnDDP0QDRZYJq8vsWsNKvmBGpBBHrg25MS5p",
"type": "java.lang.Integer",
"key": "size",
"value": 10,
"encryption": null,
"grnType": "graphgridshowmeparameter",
"label": "GraphGridShowmeParameter"
}
],
"empty": false,
"parameterMap": {
"size": 10,
"testSearch": "",
"from": 0
}
}

Executes an existing showme route and search query.

Base URL: /1.0/search/executeSearch/{{clusterName}}/{{policyName}}/{{showmePath}}/**
Method: POST/PUT/GET/PATCH/DELETE

ParameterDescription
clusterName stringThe GraphGrid Cluster with an Index Policy.
policyName stringThe name used to load the index policy on S3.
showmePath stringThe path of the showme.
Request
curl --location --request GET "${API_BASE}/1.0/search/executeSearch/default/gg-dev-index-policy/testSearch?params=%7B%22name%22%3A%22Smith%22%7D" \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Response
{
"report": {
"summary": {
"totalCount": 10,
"countDistribution": {
"person": 10
}
}
},
"data": {
"person": {
"documentCount": 10,
"maxScore": 20.086287,
"documentData": [
{
"id": "grn:gg:knowledgegraphentity:9oQRmoGBTzAq08d8cDT1VGw2iINiqzt1BugiXIvmnogD",
"score": 20.086287,
"caption": "adam smith smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:9oQRmoGBTzAq08d8cDT1VGw2iINiqzt1BugiXIvmnogD",
"lastSearchIndexedAt": "2020-11-13T13:35:16+00:00",
"born": null,
"name": "adam smith smith",
"index": null,
"updatedAt": "2019-10-13T13:19:12+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:fPPQW5ys68YXAPVrbyC4WwicMWnMip37Zbl2qfh9YeGi",
"score": 19.477934,
"caption": "smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:fPPQW5ys68YXAPVrbyC4WwicMWnMip37Zbl2qfh9YeGi",
"lastSearchIndexedAt": "2020-11-13T13:29:17+00:00",
"born": null,
"name": "smith",
"index": null,
"updatedAt": "2019-07-31T12:47:47+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:dA1upWmes4T2NhYBdM1FkCmjonHEPCj2CRW44vJlrzpd",
"score": 18.633408,
"caption": "Adam Smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:dA1upWmes4T2NhYBdM1FkCmjonHEPCj2CRW44vJlrzpd",
"lastSearchIndexedAt": "2019-09-23T15:20:05+00:00",
"born": null,
"name": "Adam Smith",
"index": null,
"updatedAt": "2019-09-23T15:20:05+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:1QBVHF07JsoN6QnLsRw7Sqz3S7gJUfG65uQulDYgcdIN",
"score": 18.633408,
"caption": "adam smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:1QBVHF07JsoN6QnLsRw7Sqz3S7gJUfG65uQulDYgcdIN",
"lastSearchIndexedAt": "2020-11-13T13:32:13+00:00",
"born": null,
"name": "adam smith",
"index": null,
"updatedAt": "2019-08-29T00:17:59+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:S2T7wdIIospK8Gbd4Oh0B1imyJmfKM39S6qPE8z5UHgJ",
"score": 17.132257,
"caption": "Smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:S2T7wdIIospK8Gbd4Oh0B1imyJmfKM39S6qPE8z5UHgJ",
"lastSearchIndexedAt": "2019-09-18T02:15:30+00:00",
"born": null,
"name": "Smith",
"index": null,
"updatedAt": "2019-09-18T02:15:29+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:X2KcPlkVcgT72jIW3t2rccDUMUMcTFmdigje3a548sTQ",
"score": 16.945915,
"caption": "smith smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:X2KcPlkVcgT72jIW3t2rccDUMUMcTFmdigje3a548sTQ",
"lastSearchIndexedAt": "2019-09-17T11:31:50+00:00",
"born": null,
"name": "smith smith",
"index": null,
"updatedAt": "2019-09-17T11:31:50+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:0iFPOr1dMehmUUGANGqiUhYKu7hRZzaMkB4aytRSFVxm",
"score": 16.945915,
"caption": "Smith Smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:0iFPOr1dMehmUUGANGqiUhYKu7hRZzaMkB4aytRSFVxm",
"lastSearchIndexedAt": "2020-11-13T13:32:02+00:00",
"born": null,
"name": "Smith Smith",
"index": null,
"updatedAt": "2019-08-28T01:09:10+00:00"
}
},
{
"id": "grn:gg:person:P0yfRaVvuuKQBhcXgbwPxA7VBhNWiBuGmXSukXgzTs7N",
"score": 15.990435,
"caption": "Keith Smith",
"source": {
"grn": "grn:gg:person:P0yfRaVvuuKQBhcXgbwPxA7VBhNWiBuGmXSukXgzTs7N",
"lastSearchIndexedAt": "2020-11-13T13:35:49+00:00",
"born": null,
"name": "Keith Smith",
"index": null,
"updatedAt": "2020-11-04T19:03:39+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:CJTc58qeoKafBaLnuEoX6UPAKXyGS081017in1efewFh",
"score": 15.990435,
"caption": "mitch smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:CJTc58qeoKafBaLnuEoX6UPAKXyGS081017in1efewFh",
"lastSearchIndexedAt": "2020-11-13T13:35:35+00:00",
"born": null,
"name": "mitch smith",
"index": null,
"updatedAt": "2020-06-14T18:34:04+00:00"
}
},
{
"id": "grn:gg:knowledgegraphentity:h4AajjCirPe2OVidPiOtTMH4RkBe0Y5oWxb2xunOUNB1",
"score": 15.931688,
"caption": "ha smith smith smith",
"source": {
"grn": "grn:gg:knowledgegraphentity:h4AajjCirPe2OVidPiOtTMH4RkBe0Y5oWxb2xunOUNB1",
"lastSearchIndexedAt": "2020-11-13T13:34:18+00:00",
"born": null,
"name": "ha smith smith smith",
"index": null,
"updatedAt": "2020-05-26T10:38:40+00:00"
}
}
]
}
},
"suggest": {},
"collapse": {},
"searchParams": {}
}