Mine Data Post

POST https://api-v2.omnianalytics.live/api_v2/minedataml

This POST method will add a block to the chain. This is a very dynamic call, that requires a json object with the data to be sent to the server. This object MUST follow the following rules: Any object that needs to be encrypted, the key must have the word 'Encrypt' added to it. EG: fileEncrypt. This will make sure that the SDK encrypts the value in all methods available prior to it being sent to a node.

To add data that will be encrypted, in your JSON you must add the phrase Encrypt to the end of the field name. Please see example below.

StartFragment

{

"key":"{Organization Key}" "unitName":"{Organization Unit name}" "server":"{Node server can be over ridden}", "applicationdate":"2020/01/03", "departmentEncrypt":"IT", "consumptiondeptEncrypt":"DEVELOPMENT ADM ", "accountingconfdate":"2020/02/12", "supplieragencyEncrypt":"Z01779", "password":"{User password}", "locationEncrypt":"Local", "invoicedate":"2020/01/03", "supplierEncrypt":"Z01779", "user":"{Username}", "materialnameEncrypt":"MOUSE LOGITECH B100", "unitEncrypt":"UNIT", "invoiceqtyEncrypt":"1", "incomingdate":"2020/01/03", "poynEncrypt":"Y", "warehouseEncrypt":"PWI Consumer W/H", "incomingqtyEncrypt":"1", "ponoEncrypt":"PWI1ESPPO1912270008", "podate":"2019/12/27", "rtddate":"2019/12/27", "rtadate":"2019/12/27", "poqtyEncrypt":"1", "applicationdtvsinvEncrypt":"0", "incomingdtvspoEncrypt":"7", "incomingdtvsrtdEncrypt":"7" }

This will create 2 blocks. The first will be for the organization, and will be accessible only by the organization together with other blocks that they own. The second will be for the user. Again it will be accessible only by that user together with any other blocks that they own.

Fieldnames with the word 'Encrypt' appended to their name will be stored in 2 different formats within the blocks

  1. Encrypted - AES 256. Available for decryption
  2. HE - AES 256. Available for full text search. NOT DECRYPTABLE

The initial block for a user group will be the block that creates the schematic for the block. Once this is done the schema for that key, user/password is fixed.

EndFragment

It is very important to note that a blockchain is immutable. Once a block is up, it cannot be deleted or modified. If a username, password or key are lost then access to the block is also lost!

Request Body

{"user"=>"mymzcFb0xdaCyweu3TSjYtoe1TC3", "unitName"=>"sibain@omniindex.io", "key"=>"sibain@omniindex.io", "schema"=>{"obj_1"=>{"name"=>"file_meta", "filenameencrypt"=>"", "modifieddate"=>"", "createddate"=>"", "authorsencrypt"=>"", "filesize"=>"", "filetype"=>"", "tagsencrypt"=>"", "pathencrypt"=>"", "index_1"=>["filenameencrypt", "pathencrypt", "authorsencrypt"]}, "obj_2"=>{"name"=>"file_searchable", "content"=>""}, "obj_3"=>{"name"=>"file_store", "fileencrypt"=>""}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{}