⚙️
Validator Node API Doc
  • Welcome!
  • Quick Start
  • Reference
    • API Reference
      • Request to Send
      • Approval to send
Powered by GitBook
On this page
  • Get your API keys
  • Install the library
  • Make your first request
  • Get Node Info

Quick Start

Good to know: You will need access to a Validator node to try out your API.

Get your API keys

Your API keys can be retrieved

You can generate an API key from your Dashboard at any time.

Install the library

The best way to interact with our API is to use one of our official libraries:

# Install via NPM
npm install --save @mlayerlabs/validator
# Install via pip
pip install --upgrade mlayerlabs/validator

Good to know: Using tabs to separate out different languages is a great way to present technical examples or code documentation without cramming your docs with extra sections or pages per language.

Make your first request

To make your first request, send an authenticated request to the pets endpoint. This will create a pet, which is nice.

Get Node Info

GET https://123.233.234/v1info

Creates a new pet.

Request Body

Name
Type
Description

name*

string

The name of the pet

owner_id

string

The id of the user who owns the pet

species

string

The species of the pet

breed

string

The breed of the pet

{
    "name"="Wilson",
    "owner": {
        "id": "sha7891bikojbkreuy",
        "name": "Samuel Passet",
    "species": "Dog",}
    "breed": "Golden Retriever",
}

Good to know: You can use the API Method block to fully document an API method. You can also sync your API blocks with an OpenAPI file or URL to auto-populate them.

Take a look at how you might call this method using our official libraries, or via curl:

curl https://api.myapi.com/v1/pet  
    -u YOUR_API_KEY:  
    -d name='Wilson'  
    -d species='dog'  
    -d owner_id='sha7891bikojbkreuy'  
// require the myapi module and set it up with your API key
const myapi = require('myapi')(YOUR_API_KEY);

const newPet = away myapi.pet.create({
    name: 'Wilson',
    owner_id: 'sha7891bikojbkreuy',
    species: 'Dog',
    breed: 'Golden Retriever',
})
// Set your API key before making the request
myapi.api_key = YOUR_API_KEY

myapi.Pet.create(
    name='Wilson',
    owner_id='sha7891bikojbkreuy',
    species='Dog',
    breed='Golden Retriever',
)
PreviousWelcome!NextAPI Reference

Last updated 1 year ago