Page tree
Skip to end of metadata
Go to start of metadata

The Node Data Service is a simple JSON web API that lives at each node within a SHRINE network. It serves the contents of the metaData section within shrine.conf, SHRINE's configuration file.

The Node Data service responds to three different GET commands:

  1. /ping: Returns pong; this is primarily a test to see if the service is active.
  2. /data: Returns all of the contents within the metaData section as JSON.
  3. /data?key=exampleKeyName: Returns the configuration value that corresponds to 'exampleKeyName'. Replace 'exampleKeyName' with other key names to get the correct corresponding value.

For example, consider the following shrine.conf file:

 
shrine.conf
shrine {
    metaData {
      hello = "world"
      five = 5
      count = ["one", "two", "three"]
    }
  .... More ....
}


Executing curl "https://{path-to-metadata}/data?key=hello" would result in the response "world". Executing curl "https://{path-to-metadta}/data results in the following response:

{
  "hello": "world",
  "five": 5,
  "count": ["one", "two", "three"]
}
  • No labels