API standard (1.0)

All data in the information ecosystem must be open and machine-readable.
The API of the services through which this data is provided must comply with the general standard.

File datarobots.txt

The datarobots.txt file contains the basic information required for automatic data parsing through the services API.

Principles of requesting and sending data

The user data structure is a collection of objects.
The service API must accept the object's URN (more details below) as input via a GET request and return data in JSON format.

example of request:
http://ethnogenesis.org/api/?urn=urn:opendata:articles:ethnogenesis.org
The API address to which you want to send a GET request ("? Urn =") is specified in datarobots.txt in the "Api:" field"

URN

URN - Uniform Resource Name.
Each object has its own URN. In the information environment, "urn:opendata" is used as the namespace, with which the object address begins.
It is also possible to use standard URNs from well-known namespaces. For example urn:isbn:5170224575 - URN of the book by ISBN number.

ID

Each object must have an id, which is indicated at the end of the URN.
For ID used:

  • domain - for a service, organization or other object that has its own domain;
  • email address - for users;
  • random SHA-1 hash (40 characters 0..9/a..z) - for all other types of objects

examples:
urn:opendata:articles:ethnogenesis.org
urn:opendata:tokenbalance:ethnogenesis.org:konstantin@55334.ru
urn:opendata:article:domain.com:779b7af85d527f87bae6a14ff581654d2aae0d6e

JSON

The JSON array returned on request must consist of the following elements::

urn - URN of the given object
status - Request processing status (1 - no errors, 0 - error);
message - Request result message ('Ok' - if there are no errors);
timestamp - Object edit/create time in utc+0 timezone;
service - The online service in which the current version of the object was created;
data - Object data in accordance with the requirements for the structure of this URN.