Secure Nodes

Tracking & Payment System: Beta(mainnet)

API Guide

API Keys

API keys are required for the public API service and are now used in the 'My Nodes' pages of the tracking server web site.

The main purpose of the API key is replace sending email addresses of node operators in the url of API calls and removing the ability for any email address to be entered on a My Nodes page to display nodes associated with that address. It will also stop other users or bots from clicking on buttons on the Node Details page to send emails for details and challenges.

How to create an API Key

The node operator enters the email address associated with his/her nodes on the Settings page.

A new API key is generated and a confirmation email is sent to the email address entered.

When the email link for the new API key is clicked, the key is confirmed and activated.

The node operator is brought back to the Settings page and the API key is displayed.

The API key is required for use with third party applications.

Using the API

First obtain a key from the tracking server Settings page. The key must be used for any API request that returns node data linked to email address (provided at the time of the node configuration).

Note: The API calls are meant to replace any use of a url 'grid' in it. The grid urls were intended to be used by the web pages, not as stand-alone API calls. Please do not use them.

Please limit the number of API calls to no more than once every 30 seconds for periodic calls. Rate limiting will be implemented at a later time.

Any use of <sample> in a url is a value meant to be substituted without the <>. All data is returned as JSON. If an error is encountered, a JSON object with a key of "error" is returned with a message.

General

These do not require an API key

Path: /api/srvstatsReturn: the current server, region and global node counts and estimated earnings.Sample:

Path: /api/node/<node_id>/certstatusReturn: validity of the node's certificate, msg to display, certificate information, when the tracking server last checked it, and an internal flag for whether to check peers for TLS connections if the primary DNS method fails.Sample:

Note: This is used on the Node Detail web page for the certificate status. Since this information is not in the database, this call will only work against the tracking server the node is currently connected to ('curserver' property of a node)

Nodes

All of the following calls require an API key. The API key must be sent as a query parameter appended to the Path. ?key=<apikey>

Non-Paged Requests

Path: /api/nodes/<nodeid>/detail?key=<apikey>Return: returns node details for given nodeid. If the email of the API key matches the email of the node, the node t-address and stake t-address are also returned as 'taddr' and 'stkaddr'. Any open Exceptions and Downtimes are also returned.Sample:

Return: array of nodes with their associated earnings to date along with a record count and summary data that include the total zen earned to date and the current price of Zen in USD. Data is associated with the node email address linked to the API key.

The result elements with data about the number of records, total pages and the current page number along with the items requested in the 'rows' array. The number of rows requested is returned as 'rowsperpage'.