Documentation RAW

Table of Contents


Registered users of BloqVerse have access to our API, which provides the following features:


REST API Access

The API can be accessed at the following URL:


http://bloqverse.com/api/

Our API utilizes REST - and while it does not completely conform to the HAL standard, it does implement _links and _embedded properties for linking API resources, which allows it to be fully discoverable and self documenting in its responses. We provide both public data accessible to any client anonymously, as well as private data that is only available after authentication.

Performing a GET request on - http://bloqverse.com/api/cortex/v1 - should produce the following response:

{
    "namespace": "cortex/v1",
    "routes": 
    {
        "/cortex/v1": 
        {
            "namespace": "cortex",
            "methods": 
            [
                "GET",
                "OPTIONS"
            ],
            "endpoints": 
            [
                {
                    "methods": 
                    [
                        "GET"
                    ],
                    "args": 
                    {
                        "namespace": 
                        {
                            "required": false,
                            "default": "cortex/v1"
                        },
                        "context": 
                        {
                            "required": false,
                            "default": "view"
                        }
                    }
                },
                {
                    "methods": 
                    [
                        "OPTIONS"
                    ],
                    "args": 
                    {
                        "/ethereum/": 
                        {
                            "required": false,
                            "default": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1/ethereum",
                            "description": "http://localhost/r1/R1/r1.my/bloqverse/documentation/ethereum",
                            "type": "slug"
                        },
                        "/wallet/": 
                        {
                            "required": false,
                            "default": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1/wallet",
                            "description": "http://localhost/r1/R1/r1.my/bloqverse/documentation/wallet",
                            "type": "slug"
                        },
                        "/planets/": 
                        {
                            "required": false,
                            "default": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1/wallet",
                            "description": "http://localhost/r1/R1/r1.my/bloqverse/documentation/wallet",
                            "type": "slug"
                        }
                    }
                }
            ],
            "_links": 
            {
                "self": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1"
            }
        },
        "/cortex/v1/salts": 
        {
            "namespace": "cortex/v1",
            "methods": 
            [
                "GET"
            ],
            "endpoints": 
            [
                {
                    "methods": 
                    [
                        "GET"
                    ],
                    "args": 
                    {
                        "method": 
                        {
                            "required": true,
                            "description": "The name of the salt function you would like to invoke. Supported methods include get and set.",
                            "type": "string"
                        },
                        "params": 
                        {
                            "required": false,
                            "description": "Piped options where set requires hashed_username, hashed_password and encrypted_value and get requires hashed_username and hashed_password.",
                            "type": "string"
                        }
                    }
                }
            ],
            "_links": 
            {
                "self": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1/salts"
            }
        },
        "/cortex/v1/planets": 
        {
            "namespace": "cortex/v1",
            "methods": 
            [
                "GET"
            ],
            "endpoints": 
            [
                {
                    "methods": 
                    [
                        "GET"
                    ],
                    "args": 
                    {
                        "method": 
                        {
                            "required": true,
                            "description": "The name of the planet function you would like to invoke. Validmethods include atom, atoms, player and universe.",
                            "type": "string"
                        },
                        "params": 
                        {
                            "required": false,
                            "description": "Piped options for invoked method - if required.",
                            "type": "string"
                        }
                    }
                }
            ],
            "_links": 
            {
                "self": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1/planets"
            }
        },
        "/cortex/v1/ethereum": 
        {
            "namespace": "cortex/v1",
            "methods": 
            [
                "GET"
            ],
            "endpoints": 
            [
                {
                    "methods": 
                    [
                        "GET"
                    ],
                    "args": 
                    {
                        "key": 
                        {
                            "required": true,
                            "description": "This endpoint requires a valid BCE API Key that corresponds to the correct referer.",
                            "type": "string"
                        },
                        "method": 
                        {
                            "required": true,
                            "description": "The name of the Ethereum function that you would like to invoke. Supported methods include blockNumber, call, estimateGas, gasPrice, getBalance, getBlockByHash, getBlockByNumber, getBlockTransactionCountByHash, getBlockTransactionCountByNumber, getCode, getLogs, getStorageAt, getTransactionByBlockHashAndIndex, getTransactionByBlockNumberAndIndex, getTransactionByHash, getTransactionCount and sendRawTransaction.",
                            "type": "string"
                        },
                        "params": 
                        {
                            "required": false,
                            "description": "Piped options closely following documented Geth Calls.",
                            "type": "string"
                        },
                        "chain": 
                        {
                            "required": false,
                            "description": "Used to switch from public networks to private consortium networks.",
                            "type": "string"
                        }
                    }
                }
            ],
            "_links": 
            {
                "self": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1/ethereum"
            }
        },
        "/cortex/v1/wallet": 
        {
            "namespace": "cortex/v1",
            "methods": 
            [
                "GET"
            ],
            "endpoints": 
            [
                {
                    "methods": 
                    [
                        "GET"
                    ],
                    "args": 
                    {
                        "key": 
                        {
                            "required": true,
                            "description": "This endpoint requires a valid BCE API Key that corresponds to the correct referer.",
                            "type": "string"
                        },
                        "method": 
                        {
                            "required": true,
                            "description": "The name of the Wallet function that you would like to invoke. Supported methods include get, tx, erc20factory, erc721factory, erc20 and erc721.",
                            "type": "string"
                        },
                        "params": 
                        {
                            "required": false,
                            "description": "Piped options as documented.",
                            "type": "string"
                        }
                    }
                }
            ],
            "_links": 
            {
                "self": "http://localhost/r1/R1/r1.my/bloqverse/api/cortex/v1/wallet"
            }
        }
    },
    "_links": 
    {
        "up": 
        [
            {
                "href": "http://localhost/r1/R1/r1.my/bloqverse/api/"
            }
        ]
    }
}

In order to make a private API request, such as those needed to make use of the Ethereum functionality, in addition to the required method - you will also need to include your BloqVerse API Key as follows:

http://bloqverse.com/api/cortex/v1/ethereum?method=blockNumber&key=your-api-key

Each API Key is linked to a specific referer domain and can only be used to make requests from that domain.

However, the your-api-key is a specific API Key that enables anyone to view the API responses from this domain.


Table of Contents