I am expecting to be able to query my blockchain, using the published omniindex runanalyticquery endpoint.
First I ran getblockschematic, so that I could see the fields I want to run the query against…
In my blockchain schematic I have two fields I want to run some analytics on, job (which is not encrypted) I am expecting to be able to query my blockchain, using the published omniindex runanalyticquery endpoint.
First I ran getblockschematic, so that I could see the fields I want to run the query against…
In my blockchain schematic I have two fields I want to run some analytics on, job (which is not encrypted) and info (which is homomorphically encrypted) = infosearchableowners
Response extract: { "13": { "column_name": "infoglobal", "data_type": "text" }, "14": { "column_name": "infosearchableglobal", "data_type": "text" }, "15": { "column_name": "ipv4global", "data_type": "text" }, "16": { "column_name": "ipv4searchableglobal", "data_type": "text" }, "17": { "column_name": "job", "data_type": "text" },
Here is my API call from Postman (I have obfuscated the private keys with the postman environment variables in {{ }} ).
{
"analyticQuery": "SELECT job, infoowners FROM WHERE infosearchableowners LIKE '{%dignissimos%}' LIMIT
3", "unitName": "{{unitName}}",
"server": "{{seedNode}}",
"Type": "Owners",
"user": "{{user}}",
"password":"{{password}}" ,
"showProtected" : "false"
}
But I get an empty result response:
{
"results": []
}
I have checked checked that ‘dignissimos’ is in the encrypted field My understanding of the documentation is that I can query encrypted fields (without them being decrypted) - I used the “showProtected” : “false” key here. I’ve used the ‘Owner’ type with correct username / password pairing
Looks to me like a simple typo around the cipher:
It's a mistake I've made several times and while I am certain others will be able to explain better, the curly brackets are inside the percent symbols in order to search encrypted fields for ciphered contents.
Anyway, try this and you should get a result like this:
or whatever is in your data set. I note you want to do some analytics, so some script like this would return you a count of all the matches for your query (really useful against an encrypted field!)
}