Skip to main content

API Interfaces

API interfaces are self documenting. The descriptions below are taken from the online documentation and might be out of date. Refer to the following links for live documentation:

These APIs handle sensitive processes or write or read to the GramChain requiring additional security and separation from public APIs. Note that there are separate writing APIs for scanner (for vault personnel) and for Web Interfaces (Admin, locks).

The GramChain API requires the following default parameters:

  1. languageid = this field is a two-character support for simple multi-language. Default value is 'en' for English, 'cn' for Chinese.

  2. entityid = a field which allows for different results to be returned based on caller entity, (e.g. Cache, P2P, scanner) for scanner entries use empty string '' as default.

  3. callerid = the userID calling this API (if known). This allows for traceability of data access (required for scanner) but is not a required for public calls and can be left black.

DropDownValue APIs return allowed values for GramChain code fields. These are used to populate dropdowns and can be filtered based on entityid. Typically these values should be called once and cached locally by scanners on startup as their data rarely change.

The blockchain hash used to verify GramChain integrity hashes legible codes (values), not the names or description associated with the codes. For example, the international common code 'AU' is used as a MetalCode code to codify the more common Name/Description 'Gold'. An advantage of this system is that the codes provide transparency (AU) while also allowing the code to be mapped to multiple languages for multi-language support.

The DropDownValues API requires the following parameters:

  1. languageid = this field is a two-character support for simple multi-language. Default value is 'en' for English, 'cn' for Chinese.

  2. entityid = a field which allows for different results to be returned based on caller entity, (e.g. Cache, P2P, scanner) for scanner entries use empty string '' as default.

  3. callerid = the userID calling this API (if known). This allows for traceability of data access (required for scanner) but is not a required for public calls and can be left black.

  4. app = the calling app code. This filters events and other dropdown values based on the app. For vault scanners use 'scan' for P2P use 'p2p' for cache use 'cache'

These are public APIs that will be called most often and require good scalability.

The API requires the following default parameters:

  1. languageid = this field is a two-character support for simple multi-language. Default value is 'en' for English, 'cn' for Chinese.

  2. entityid = a field which allows for different results to be returned based on caller entity, (e.g. Cache, P2P, scanner) for scanner entries use empty string '' as default.

  3. callerid = the userID calling this API (if known). This allows for traceability of data access (required for scanner) but is not a required for public calls and can be left black.