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
This is because you have a misplaced '{' curly brace. These tell the OmniIndex API that the text it surrounds is a FHE block and needs to be treated as such. You can see more details on this in the API docs Swagger By replacing
with
All should be good