-
Notifications
You must be signed in to change notification settings - Fork 6
REST API
Upload a new or existing object where {Id} is the identifier of the object.
http://{URL}/upload/{Id}
Return value is the hash of the uploaded Object.
PowerShell example ($id is the Identifier and $con is the JSON string):
Invoke-RestMethod -Uri "http://localhost:5000/upload/$($id)" -Method Post -Body $con -ContentType "application/json; charset=utf-8"
Upload a new or existing object where {Id} is the identifier of the object.
Note: XML will be converted into JSON.
http://{URL}/uploadxml/{Id}
Return value is the hash of the uploaded Object.
Resolves the Blockchain with all hashed values and returns the full object in JSON Format.
http://{URL}/full?id={Id}[&index={revision}]
http://{URL}/full?{lookupId}={LookupValue}[&index={revision}]
Example:
http://server/full?name=NUC1&index=1
http://{URL}/diff?id={Id}[&index={revision}]
http://{URL}/diff?{lookupId}={LookupValue}[&index={revision}][&mode=0¦1]
Diff Modes: Mode 0 returns the full object; Mode 1 returns in jsondiffpatch format
Example:
http://server/diff?name=NUC1&index=1
http://{URL}/query?[JSONPath,..][&$select={KeyName,..}]
Example:
http://{URL}/query?OS.Caption,OS.Version&$select=%23Name,_date
http://{URL}/queryall?[JSONPath,..][&$select={KeyName,..}]
Example:
http://{URL}/queryall?OS.Caption,OS.Version&$select=%23Name,_date
http://{URL}/search?{free text}&$select=%23Name
Get all index,timestamp and hashid for a specific device.
http://{URL}/history?id={Id}[&index={revision}]
http://{URL}/history?{lookupId}={LookupValue}
Eports all blocks of all blockchains and upload to another JainDB. This is required if something does chain on the blockchain logic or if you want to change the hash algorythm etc.
http://{URL}/export?url={URL encoded target URL}[&remove={Jpath;Jpath}]
To remove objects during export, the "remove" option can be used to specify a JPath of an Object or Attribute.
Convert an XML Object into JSON and return the JSON without uploading to the blockchain.
http://{URL}/xml2json