NAV Navbar
javascript

Introduction

Welcome to the Dappros Platform API documentation! You can use your JWT token to access Dappros Platform API endpoints, which can get information on various users, wallets, apps, tokens and ethers in our database.

We have language bindings in JavaScript! You can view code examples in the dark area to the right.

Authentication

To authorize, use request headers as follows:

{
"Content-Type" : "application/json",
"Authorization" : "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVjNWZhYWIyM2U5ZWU4MTczY2U3OTg0NyIsImFwcF9uYW1lIjoiVHJhY3lDaGFpbjEiLCJhcHBfZGVzYyI6IkFzc2V0IFRyYWNraW5nIERlY2VudHJhbGl6ZWQgQXBwIiwiYXBwX3VybCI6Ind3dy50cmFjeWNoYWluLmNvbSIsIl9fdiI6MH0sImlhdCI6MTU0OTc3MzQ5MH0.AYjA2XS-EkKBcR2iVj4nkJES33lynjVdxp7eyXNUihM"
}

Make sure to replace "Authorization": JWT Token with your JWT token.

Dappros Platform uses JWT Token to allow access to the API. You will receive JWT upon registering to https://www.app.dappros.com.

Dappros Platform expects the JWT token to be included in all API requests that needs authorization to the server in a header that looks like the following:

Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVjNWZhYWIyM2U5ZWU4MTczY2U3OTg0NyIsImFwcF9uYW1lIjoiVHJhY3lDaGFpbjEiLCJhcHBfZGVzYyI6IkFzc2V0IFRyYWNraW5nIERlY2VudHJhbGl6ZWQgQXBwIiwiYXBwX3VybCI6Ind3dy50cmFjeWNoYWluLmNvbSIsIl9fdiI6MH0sImlhdCI6MTU0OTc3MzQ5MH0.AYjA2XS-EkKBcR2iVj4nkJES33lynjVdxp7eyXNUihM

Users API

Register a user

Request body

{
    "first" :  "Taras",
    "last" :  "Filatov",
    "username" : "phwizard",
    "password" : "^skC#446&9-Q",
    "email" : "[email protected]",
    "country" : "United Kingdom",
    "phone" : "2032875342",
    "address" : "101 Euston Rd, London NW1 2RA",
    "zip" : "123456"
}

The above command returns JSON structured like this:

[
  {
    "success": true,
    "msg": "User is registered and can now login",
    "user": {
        "_id": "5c5fa659dc566711797ae4ee",
        "first": "Taras",
        "last": "Filatov",
        "country": "United Kingdom",
        "address": "101 Euston Rd, London NW1 2RA",
        "phone": 2032875342,
        "email": "[email protected]",
        "zip": 123456,
        "username": "phwizard",
        "password":  "$2a$10$2WxxQWokYd/rAxVE7Gzgg.RKIAzIrqgs.ossAmFwpHErU.j/UTwFq",
        "default_wallet": {
            "acc_name": "phwizard's Wallet",
            "address": "0x28cec7483d5133f79f13af44ddd007af4c00c994"
        },
        "app_id": "5c5f9dd4dc566711797ae4eb",
        "time_join": "2019-02-10T04:19:37.026Z",
        "__v": 0
            }
  }
]

This endpoint registers a third party end user on Dappros Platform. This endpoint registers a user and assigns a wallet and a unique Id to user and also returns the entire user data.

HTTP request

POST https://app.dappros.com/v1/users

Request headers

Parameter Value Description
Content-type 'application/json' Content type of request body.
Authorization (required) JWT security token provided while adding an app to Dappros Platform.

Request body

Parameter Value Description
firstName String (Not mandatory) First name of user of third party app.
lastName String (Not mandatory) Last name of user of third party app.
username String (required)(unique) Username of user of third party app. Can be chosen based on availability.
password String (required) Password chosen by user of third party app.
email String (required) Email address of user of third party app.
country String (Not mandatory) Country of user of third party app.
phone Number (not mandatory) Phone number of user of third party app.
addressLine1 String (Not mandatory) Address Line 1 of user of third party app.
addressLine2 String (Not mandatory) Address Line 2 of user of third party app.
city String (not mandatory) City of user of third party app.
zip Number (not mandatory) Postal code of user of third party app.
accountName String (not mandatory) Name of crypto wallet to be provided to user on registration. If user doesn’t specify one then it will be set based on the username.

Get all user objects for particular application

Request headers


{
"Authorization" : "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMjMxMGVlY2MxNjhhMmFlMDlkZmNkNSIsImFwcE5hbWUiOiJUZXN0IEFwcCBEQVBQIiwiYXBwRGVzY3JpcHRpb24iOiJudWxsIiwiYXBwVXJsIjoibnVsbCIsImFwcExvZ29IYXNoIjpudWxsLCJjcmVhdGVkQXQiOiIyMDE5LTA3LTA4VDA5OjQ2OjIyLjA0NVoiLCJfX3YiOjB9LCJpYXQiOjE1NjI4MzQzOTB9.SWJIkss267OrS1PXfdvAVa1c-zjNnjpE8qHW1ff8jtc"
}

Response body:

{
    "success": true,
    "users": [
        {
            "defaultWallet": {
                "accountName": "testuser's Wallet",
                "walletAddress": "0x23a8b1db65b22b9cD06aAB2dABF26243cD31fdA5"
            },
            "tags": [
                "backend"
            ],
            "defaultApp": "100",
            "_id": "5d26f3b6392ef67c333ec6d9",
            "firstName": "John",
            "lastName": "Doe",
            "country": null,
            "email": "[email protected]",
            "username": "testuser",
            "password": "$2a$10$7MO/NxKTpdunkHsPCyX0Fen/CmM/FpIdLlKwcMoslwkRedz58Gfxq",
            "appId": "5d2310eecc168a2ae09dfcd5",
            "ACL": {
                "ownerAccess": false
            },
            "createdAt": "2019-07-11T08:30:46.384Z",
            "__v": 0,
            "image": ""
            "balance": []
        },
        {
            "defaultWallet": {
                "accountName": "testuser3's Wallet",
                "walletAddress": "0x119162877992E1690aEE3EaeF83aA41654E9AeA3"
            },
            "tags": [
                "backend",
                "blockchain"
            ],
            "defaultApp": "100",
            "_id": "5d26f40a392ef67c333ec6e7",
            "firstName": "Jason ",
            "lastName": "Paul",
            "country": null,
            "city": null,
            "addressLine1": null,
            "addressLine2": null,
            "email": "[email protected]",
            "zip": null,
            "username": "testuser3",
            "password": "$2a$10$UZt2i/cv6ZVS9Tf/PyAgZ.vdBaC1TDTbwzAcfChKKBe0SHK7cKQ8e",
            "appId": "5d2310eecc168a2ae09dfcd5",
            "ACL": {
                "ownerAccess": false
            },
            "createdAt": "2019-07-11T08:32:10.866Z",
            "__v": 0,
            "image": ""
            "balance": [
                {
                    "tokenName": "Test Token Reward",
                    "tokenSymbol": "TTR",
                    "balance": 100
                }
            ]
        }
    ]
}

This endpoint supplies all end user objects for a particular application if valid JWT is provided for application added to Dappros Platform.

This end point includes pagination.

HTTP request

GET https://app.dappros.com/v1/users

Request headers

Parameter Value Description
Authorization (required) JWT security token provided while adding an app to Dappros Platform.

URL query parameters

Parameter Description
tag Tag(s) assigned to user object
limit Number of user objects to be provided in response
offset Number of user objects to skip. Users are stored in natural order and skipped based on same order.

Example

URL: https://app.dappros.com/v1/users?tag=backend&limit=2&offset=0

Get a specific user object

{
    "Authorization" :  "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZ0BkYXBwcm9zLmNvbSdzIFd6NzFxeVRTbWRSQzZtV2pLcHh1T0p1R3M5alkybGZKQTRhRzRnNHVOZGkwajREZGlGbkREMVJmencifSwiaWF0IjoxNTYyODMzMzM1LCJleHAiOjE1NjI5MTk3MzV9.9PG81k25TkPEPiD1UCQPGAjdn0Tt-X2k5avjfsio09U"
}

The above command returns JSON structured like this:

{
    "success": true,
    "user": {
        "defaultWallet": {
            "accountName": "Taras's Wallet",
            "walletAddress": "0x2f5f576bAc524Ea485CbB36E431329A602267736"
        },
        "tags": [],
        "defaultApp": "5d1dacf3b534bd121b5035f5",
        "_id": "5d1dacc9b534bd121b5035ea",
        "firstName": "Taras",
        "lastName": "Filatov",
        "email": "[email protected]",
        "username": "[email protected]",
        "password": null,
        "company": "Dappros",
        "workAs": "company",
        "emailVerified": false,
        "ACL": {
            "ownerAccess": true
        },
        "createdAt": "2019-07-04T07:37:45.453Z",
        "__v": 0,
        "verifyEmailToken": "5380d9154bba9fe0357e9c7bc024b9f47f70ca97",
        "verifyLinkExpires": "2019-07-11T07:37:47.990Z",
        "loginTime": "2019-07-11T08:22:15.870Z",
        "profileImageHash": "QmfJ7xbhjt9PEpxSbhtdh7BaWDPjBU4FGG3BwqUgTPZySu",
        "image": ""
    }
}

This end point allows app owners and end users to get their user object.

HTTP request

GET https://app.dappros.com/v1/users/profile

Request headers

Parameter Value Description
Authorization (required) JWT security token of user.

Update a specific user object

Request Headers:


{
"Content-Type" :  "application/json",
    "Authorization" :  "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZ0BkYXBwcm9zLmNvbSdzIFdhbGxldCIsIndhbGxldEFkZHJlc3MiOiIweDJmNWY1NzZiQWM1MjRFYTQ4NUNiQjM2RTQzMTMyOUE2MDIyNjc3MzYifSwidGFncyI6W10sImRlZmF1bHRBcHAiOiI1ZDFkYWNmM2I1MzRiZDEyMWI1MDM1ZjUiLCJfaWQiOiI1ZDFkYWNjOWI1MzRiZDEyMWI1MDM1ZWEiLCJmaXJzdE5hbWUiOiJEZWVwYW5zaHUiLCJsYXN0TmFtZSI6IkdhcmciLCJlbWFpbCI6ImRlZXBhbnNodS5nYXJnQGRhcHByb3MuY29tIiwidXNlcm5hbWUiOiJkZWVwYW5zaHUuZ2FyZ0BkYXBwcm9zLmNvbSIsInBhc3N3b3JkIjoiJDJhJDEwJGR5a2JFMFRXOHFvdXFKRDJLZ0t3bGVSV3FJak1zWHhJR0J6djhNbHRPRzRCTTBTa0ZIcDJ5IiwiY29tcGFueSI6IkRhcHByb3MiLCJ3b3JrQXMiOiJjb21wYW55IiwiZW1haWxWZXJpZmllZCI6ZmFsc2UsIkFDTCI6eyJvd25lckFjY2VzcyI6dHJ1ZX0sImNyZWF0ZWRBdCI6IjIwMTktMDctMDRUMDc6Mzc6NDUuNDUzWiIsIl9fdiI6MCwidmVyaWZ5RW1haWxUb2tlbiI6IjUzODBkOTE1NGJiYTlmZTAzNTdlOWM3YmMwMjRiOWY0N2Y3MGNhOTciLCJ2ZXJpZnlMaW5rRXhwaXJlcyI6IjIwMTktMDctMTFUMDc6Mzc6NDcuOTkwWiIsImxvZ2luVGltZSI6IjIwMTktMDctMTBUMDY6NDc6NDMuNjc2WiIsInByb2ZpbGVJbWFnZUhhc2giOiJRbWZKN3hiaGp0OVBFcHhTYmh0ZGg3QmFXRFBqQlU0RkdHM0J3cVVnVFBaeVN1IiwicmFuZG9tU3RyaW5nIjoiRXVYb24vUE9CT09zMG5Ld3FnMWphRnVGeWlNYW9yakl1N0JYSzRJQmpIdDJiNmxQcXd0OEFmbFhIVHNqZjBrVXRpdWcxaUphRWpiSUUrb2dUb2ZZSHFpcGNrMUoxU1lzelViQWU3dnlZYjhVTzgwZjhLc1h6NzFxeVRTbWRSQzZtV2pLcHh1T0p1R3M5alkybGZKQTRhRzRnNHVOZGkwajREZGlGbkREMVJmencifSwiaWF0IjoxNTYyODMzMzM1LCJleHAiOjE1NjI5MTk3MzV9.9PG81k25TkPEPiD1UCQPGAjdn0Tt-X2k5avjfsio09U"
}

Request Body:


{
    "firstName":"Taras",
    "lastName":"Filatov",
    "username":"phwizard",
    "email":"[email protected]"
}

The above command returns JSON structured like this:


{
    "success": true,
    "msg": "User profile updated successfully"
}

This endpoint allows users to update their profile data.

HTTP request

PUT https://app.dappros.com/v1/users

Request headers

Parameter Value Description
Content-Type 'application/json' Content type of request body.
Authorization (required) JWT security token of user.

Request body

Parameter Value Description
firstName string First name of registered user.
lastName string Last name of registered user.
username string Username of registered user.
email email Email address of registered user.
company string Company name of registered user.
addressLine1 string Address line 1 of registered user.
addressLine2 string Address line 2 of registered user.
city string City of user.

Login user to Dappros Platform

Request Headers:


{
    "Content-Type" :  "application/json"
}

Request Body:


{
    "username":"[email protected]",
    "password":"@dkv9#22z!"
}

The above command returns JSON structured like this:


{
    "success": true,
    "token": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZydzIFdhbGxldCIsIndhbGxldEFkZHJlc3MiOiIweDQzMTkyQzEyMjBGZTc2MzI5MThkMmJGRUY4YzZiOEI4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WmxaVU5DSW4wc0luSmhibVJ2YlZOMGNtbHVaeUk2SW5acU9XeFhiakpsU2tvdlVHeDRWbWRZYzNWV05FeE9WMW8xWldkUVluUlNhbmRoY25aa1IzYzRWMWxCYm5reVQwcGtWMUZ0VlhCbVprVkJiekZFVjNNMFIxUnJkemhzVWxOaVRERlhVMUJzU2taTWVEVXpVakJuTDJOeGVsZHZOVGg0UVVOaU5sRXljR281WkVFMlZWVXZNR3RKWTJkVVpIbFdTek5RUjBSWWJ6aEdUMk5FVDFsUFNtWm1UR05qZWl0VGRESklXVGxTZUdKVmIwaDZSamRxZGpWd2ExVkRUMU13ZUZvMk4ycFBVVEZ5ZHpKdFZsQjNjREJYT0d0cVJpOUhaRnBhWkdSaFJDSjlMQ0pwWVhRaU9qRTFOakV4T0RnMU5UQXNJbVY0Y0NJNk1UVTJNVEkzTkRrMU1IMC5Xc2pSakhzMGVaaG9yWThVblNrdUo3OFRnM1hZa3FhYkZiYTRCVy1Pd2JFIiwidmVyaWZ5TGlua0V4cGlyZXMiOiIyMDE5LTA2LTI5VDA3OjI5OjEwLjgxM1oiLCJyYW5kb21TdHJpbmciOiJaeXdTRTUrZktDd2FEbThLYnRnQkZVMHJpVmFpWkZqU0w1S0UzMEJKRlVtQVNoUzR3Mi90VWpNT0xPVjJKWkwyZjhObktOWVdKc0NKcWRBOEtGaEoxcW9Fb3ZhZWZZWGxrdzZ1U0lCNzNXTWFFMkFMd2FmQVRyQmF0VU4zTHhTeHJoZmxjZCtHQU9NVlY1TE5LUm5EZVdRRXFEIn0sImlhdCI6MTU2MzExNDQwNiwiZXhwIjoxNTYzMjAwODA2fQ.zP4xUMZdEilZOpSZgsfJRP829A5HJt-VnZmpFcVWZ8U",
    "user": {
        "defaultWallet": {
            "accountName": "Taras's Wallet",
            "walletAddress": "0x43192C1220Fe7632918d2bFEF8c6b8B8E55FeeCB"
        },
        "tags": [],
        "defaultApp": "5d0dd93bc449d43c47a8805a",
        "_id": "5d0dd8c3c449d43c47a88049",
        "firstName": "Taras",
        "lastName": "Filatov",
        "email": "[email protected]",
        "username": "[email protected]",
        "password": "$2a$10$Bd//5z0m79wqcpXoIGi2oenLID5ot/c3W30jwLgxDzm7uNPzSNBNu",
        "company": "Dappros",
        "workAs": "company",
        "emailVerified": false,
        "ACL": {
            "ownerAccess": true,
            "masterAccess": true
        },
        "createdAt": "2019-06-22T07:29:07.934Z",
        "__v": 0,
        "idHash": null,
        "loginTime": "2019-07-14T12:12:15.789Z",
        "verifyEmailToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMGRkOGMzYzQ0OWQ0M2M0N2E4ODA0OSIsInVzZXJuYW1lIjoiZGVlcGFuc2h1LmdhcmdAZGFwcHJvcy5jb20iLCJkZWZhdWx0V2FsbGV0Ijp7ImFjY291bnROYW1lIjoiZGVlcGFuc2h1LmdhcmcncyBXYWxsZXQiLCJ3YWxsZXRBZGRyZXNzIjoiMHg0MzE5MkMxMjIwRmU3NjMyOTE4ZDJiRkVGOGM2YjhCOEU1NUZlZUNCIn0sInJhbmRvbVN0cmluZyI6InZqOWxXbjJlSkovUGx4VmdYc3VWNExOV1o1ZWdQYnRSandhcnZkR3c4V1lBbnkyT0pkV1FtVXBmZkVBbzFEV3M0R1RrdzhsUlNiTDFXU1BsSkZMeDUzUjBnL2NxeldvNTh4QUNiNlEycGo5ZEE2VVUvMGtJY2dUZHlWSzNQR0RYbzhGT2NET1lPSmZmTGNjeitTdDJIWTlSeGJVb0h6RjdqdjVwa1VDT1MweFo2N2pPUTFydzJtVlB3cDBXOGtqRi9HZFpaZGRhRCJ9LCJpYXQiOjE1NjExODg1NTAsImV4cCI6MTU2MTI3NDk1MH0.WsjRjHs0eZhorY8UnSkuJ78Tg3XYkqabFba4BW-OwbE",
        "verifyLinkExpires": "2019-06-29T07:29:10.813Z",
        "randomString": "ZywSE5+fKCwaDm8KbtgBFU0riVaiZFjSL5KE30BJFUmAShS4w2/tUjMOLOV2JZL2f8NnKNYWJsCJqdA8KFhJ1qoEovaefYXlkw6uSIB73WMaE2ALwafATrBatUN3LxSxrhflcd+GAOMVV5LNKRnDeWQEqD",
        "image": "",
        "appToken": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMGRkOTNiYzQ0OWQ0M2M0N2E4ODA1YSIsImFwcE5hbWUiOiJ0ZXN0QXBwIiwiYXBwRGVzY3JpcHRpb24iOiJ1bmRlZmluZWQiLCJhcHBVcmwiOiJ1bmRlZmluZWQiLCJhcHBMb2dvSGFzaCI6bnVsbCwiY3JlYXRlZEF0IjoiMjAxOS0wNi0yMlQwNzozMTowNy41ODhaIiwiX192IjowLCJpZEhhc2giOiIkMmEkMTAkb3BMSmg1YVVWUWVEdlhUdjBwYWFKdTE2NHRJQmxNVW5XNGZOdFl3RDhGTFlDMFRxVFJLNG0iLCJyYW5kb21TdHJpbmciOiJ3NkZJSmxlZkVxNTgzYWxJMjdMdStGdjlWUlB4L3J1RmFvejlON0g1UENBM29hWVJ4dzljY29TT3o5ZitaQWxuMi9OYWFydlhLMFRCaXpQaHJDNlpaMXZFYTNLekxJWWk5clRiMU5OYnRySm5JSjEwR291WkRkQVlkbmxFV3F4UmZMcWdmdlkvdzJibldncUZIOGcifSwiaWF0IjoxNTYzMTE0NDA2fQ.x1PMd6jdrXefA_-4e7ri-LweNQdYoXOmnXbdYnIMjgE"
    }
}


This endpoint allows registered users to log into Dappros Platform.

HTTP request

POST https://app.dappros.com/v1/users/login

Request headers

Parameter Value Description
Content-Type 'application/json' Content type of request body.

Request body

Parameter Value Description
username string (required) Username of registered user.
password string (required) Password of registered user.

End user count for particular application

Request Headers:


{
    "Authorization" :  "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZ0BkYXBwcm9z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pdWcxaUphRWpiSUUrb2dUb2ZZSHFpcGNrMUoxU1lzelViQWU3dnlZYjhVTzgwZjhLc1h6NzFxeVRTbWRSQzZtV2pLcHh1T0p1R3M5alkybGZKQTRhRzRnNHVOZGkwajREZGlGbkREMVJmencifSwiaWF0IjoxNTYyODMzMzM1LCJleHAiOjE1NjI5MTk3MzV9.9PG81k25TkPEPiD1UCQPGAjdn0Tt-X2k5avjfsio09U"
}

Response:


{
    "success": true,
    "count": 2
}

This API allows to get end users for a particular application.

HTTP request

GET https://app.dappros.com/v1/users/count

Request headers

Parameter Value Description
Authorization (required) JWT security token provided while adding an app to Dappros Platform (app JWT security token)

Tokens API

Generate a ERC-20 token

Request Headers:


{
    "Content-Type" :  "application/json",
    "Authorization" : "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVjNWZhYWIyM2U5ZWU4MTczY2U3OTg0NyIsImFwcF9uYW1lIjoiVHJhY3lDaGFpbjEiLCJhcHBfZGVzYyI6IkFzc2V0IFRyYWNraW5nIERlY2VudHJhbGl6ZWQgQXBwIiwiYXBwX3VybCI6Ind3dy50cmFjeWNoYWluLmNvbSIsIl9fdiI6MH0sImlhdCI6MTU0OTc3MzQ5MH0.AYjA2XS-EkKBcR2iVj4nkJES33lynjVdxp7eyXNUihM"
}

Request Body:


{
    "tokenId":"ERC20",
    "tokenName":"Platon Token",
    "tokenSymbol":"PT",
    "amount": 1000
}

The above command returns JSON structured like this:

[
    {
        "success": true,
        "msg": "Token Created Successfully",
        "transactionHash": "0xefad7c8a03c2463dddc147259d585301dbaa088b3b9f90ff8929608ddac9a7fc",
        "reward": true
    }
]

This endpoint allows an authenticated app owner or application to generate an ERC 20 Token. Also Dappros Platform interface can be used to perform this action.

HTTP request

POST https://app.dappros.com/v1/tokens

Request headers

Parameter Value Description
Content-type 'application/json' Content type of request body. (should be omitted if providing form data and form data contains image to be uploaded as token icon)
Authorization (required) JWT token provided to owner/user while logging into Dappros Platform or application auth token provided while adding an app to Dappros Platform

Request body

Parameter Value Description
tokenId String (required) ERC token Id like "ERC20" to specify the type of token
tokenName String (required) (unique) Name of token to be generated
tokenSymbol String (required)(unique) Unique symbol to identify token
amount Number (required) Amount of tokens to be generated
supplyCap Number (not mandatory) Integer number specifying maximum number of token to be allowed to be created on blockchain including initial amount of token creation. (Don’t provide this field if unlimited extra issuance is required)
file (input element name should be file) Image file Image file to be provided for token icon (form input element) Only to be provided when providing form data and not json object as input body to API

Transfer ERC-20 token

Request Headers:


{
    "Content-Type" :  "application/json",
    "Authorization" : "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVjNWZhYWIyM2U5ZWU4MTczY2U3OTg0NyIsImFwcF9uYW1lIjoiVHJhY3lDaGFpbjEiLCJhcHBfZGVzYyI6IkFzc2V0IFRyYWNraW5nIERlY2VudHJhbGl6ZWQgQXBwIiwiYXBwX3VybCI6Ind3dy50cmFjeWNoYWluLmNvbSIsIl9fdiI6MH0sImlhdCI6MTU0OTc3MzQ5MH0.AYjA2XS-EkKBcR2iVj4nkJES33lynjVdxp7eyXNUihM"
}

Request Body:


{
    "tokenId": "ERC20",
    "tokenName": "Platon Token",
    "toWallet": "0x2f5f576bAc524Ea485CbB36E431329A602267736",
    "amount": 10
}

The above command returns JSON structured like this:

[
    {
    "success": true,
    "msg": "Token Transfered Successfully",
    "transactionHash": "0x3b0ea8c87f55fdcba376156258c5c893406d9d5e8aa520bb97f1657d9ea90d11",
    "reward": false
    }

]

Request Body for bulk transfer:


{
    "tokenId": "ERC20",
    "tokenName": "Platon Token",
    "receiverArray": [ {"walletAddress":"0x2f5f576bAc524Ea485CbB36E431329A602267736", "amount": 10}, {"walletAddress":"0x0C6DA78b05f6a376651B9Ba0789F9C6Db6e27FF4", "amount": 20}, {"walletAddress":"0x1BcfF3d0C56A429791F7e934bfa2bc2cc71A81c9", "amount": 20} ],
    "amount": 50
}

JSON response for bulk transfer:

{
    "success": true,
    "msg": "Bulk Transfer Successful",
    "transactions": [
        "0xc85e505bcf849f54e30c773f223d734c2f9fc092f2fd69ca76ebb9d3105e0818",
        "0x1c05c0365159315f5bb434da18d689a3f291ded04504d670e5358f1d5b3d0ad7",
        "0xacd9eaf6d455d7e6a243a2ef5f8bdaa9875043bf4e1903b83a5a64de1663c03f"
    ],
    "reward": false
}

Request body to transfer from end user’s wallet by application on behalf of user:


{
    "tokenId": "ERC20",
    "tokenName": "Platon Token",
    "fromWallet":"0x76561029D3155c815A037aa81D58F7007eF17fFD",
    "toWallet": "0x05AF8a3Dd69793De01e06b907DF6E672A58E0DA5",
    "amount": 50
}

The above command returns JSON structured like this:


{
    "success": true,
    "msg": "Token Transfered Successfully",
    "transactionHash": "0xd3da66d79e538197331dc2d8552e1e10cc40359448e1b9f912139fa494a2326b",
    "reward": false
}

This endpoint allows an authenticated app owner or application to transfer an ERC 20 Token in his respective wallet. Dappros Platform interface can also be used to perform this action.

HTTP request

POST https://app.dappros.com/v1/tokens/transfer

Request headers

Parameter Value Description
Content-type 'application/json' Content type of request body. (should be omitted if providing form data and form data contains image to be uploaded as token icon)
Authorization (required) JWT token provided to owner/user while logging into Dappros Platform or application auth token provided while adding an app to Dappros Platform

Request body

Parameter Value Description
tokenId String (required) ERC token Id like "ERC20" to specify the type of token
tokenName String (required) (unique) Name of token to be generated
fromWallet String (required if needed to transfer from end user’s wallet by application on behalf of user) Wallet address from which erc20 tokens are needed to be transferred
toWallet String (required) Wallet Address of the receiver
receiverArray Javascript Object (required if bulk transfer of ERC tokens is needed to be performed in single API call) Array containing wallet addresses and amount to be transferred to these addresses respectively
amount Number (required) Total amount of tokens to be transferred in single API call

Issue/Mint ERC-20 token

Request Headers:


{
    "Content-Type" :  "application/json",
    "Authorization" : "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMGRkOTNiYzQ0OWQ0M2M0N2E4ODA1YSIsImFwcE5hbWUiOiJ0ZXN0QXBwIiwiYXBwRGVzY3JpcHRpb24iOiJ1bmRlZmluZWQiLCJhcHBVcmwiOiJ1bmRlZmluZWQiLCJhcHBMb2dvSGFzaCI6bnVsbCwiY3JlYXRlZEF0IjoiMjAxOS0wNi0yMlQwNzozMTowNy41ODhaIiwiX192IjowLCJpZEhhc2giOiIkMmEkMTAkb3BMSmg1YVVWUWVEdlhUdjBwYWFKdTE2NHRJQmxNVW5XNGZOdFl3RDhGTFlDMFRxVFJLNG0ifSwiaWF0IjoxNTYzMDE5NzA5fQ.hOxG1dP2f8E0X6lluBZVK2cNqZ95oDYTE9RKaMTRqAw"
}


Request Body:


{
    "tokenId": "ERC20",
    "tokenName":"Platon Token",
    "toWallet":"0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf",
    "amount": 500
}

The above command returns JSON structured like this:

[
    {
        "success": true,
        "msg": "Token Minted Successfully",
        "transactionHash": "0xa82271ca6c3455a1e5cb36ca46237d1df25f852e4e81e6209b6cbd7d83e361e1"
    }
]

This endpoint allows an authenticated app owner or application to issue more of already created ERC20 tokens. App owner or application must have ownership of the token which he wants to mint.

HTTP request

POST https://app.dappros.com/v1/tokens/mint

Request headers

Parameter Value Description
Content-type 'application/json' Content type of request body.
Authorization (required) JWT security token provided to user while logging into Dappros Platform or application JWT security token provided while adding an app to Dappros Platform

Request body

Parameter Value Description
tokenId String (required) ERC token Id like "ERC20" to specify the type of token
tokenName String (required) Name of token to be minted
toWallet String (required) Wallet Address of wallet in which tokens are to minted
amount Number (required) Amount of tokens to be minted

Burn ERC-20 token

Request Headers:


{
    "Content-Type" :  "application/json",
    "Authorization" : "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMGRkOTNiYzQ0OWQ0M2M0N2E4ODA1YSIsImFwcE5hbWUiOiJ0ZXN0QXBwIiwiYXBwRGVzY3JpcHRpb24iOiJ1bmRlZmluZWQiLCJhcHBVcmwiOiJ1bmRlZmluZWQiLCJhcHBMb2dvSGFzaCI6bnVsbCwiY3JlYXRlZEF0IjoiMjAxOS0wNi0yMlQwNzozMTowNy41ODhaIiwiX192IjowLCJpZEhhc2giOiIkMmEkMTAkb3BMSmg1YVVWUWVEdlhUdjBwYWFKdTE2NHRJQmxNVW5XNGZOdFl3RDhGTFlDMFRxVFJLNG0ifSwiaWF0IjoxNTYzMDE5NzA5fQ.hOxG1dP2f8E0X6lluBZVK2cNqZ95oDYTE9RKaMTRqAw"
}

Request Body:


{
    "tokenId":"ERC20",
    "tokenName":"Platon Token",
    "amount": 100
}

The above command returns JSON structured like this:

[
    {
        "success": true,
        "msg": "Tokens Burned Successfully!"
    }
]

This endpoint allows an authenticated user or application to burn desired amount of created tokens.

HTTP request

DELETE https://app.dappros.com/v1/tokens

Request headers

Parameter Value Description
Content-type 'application/json' Content type of request body.
Authorization (required) JWT security token provided to user while logging into Dappros Platform or application JWT security token provided while adding an app to Dappros Platform

Request body

Parameter Value Description
tokenId String (required) ERC token Id like "ERC20" to specify the type of token
tokenName String (required) Name of token to be burned
amount Number (required) Amount of tokens to be burned

Ethers API

Transfer ethers from one wallet to another

Request headers:


{
    "Content-Type" :  "application/json",
    "Authorization" : "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMjU4NzQxNGI4MmE4NjY0NTI3MGU1YyIsImFwcE5hbWUiOiJUcmFjZXlDaGFpbiIsImFwcERlc2NyaXB0aW9uIjoiQXNzZXQgdHJhY2tpbmcgYXBwbGljYXRpb24iLCJhcHBVcmwiOiJ3d3cudHJhY2V5Y2hhaW4uY29tIiwiYXBwTG9nb0hhc2giOm51bGwsImNyZWF0ZWRBdCI6IjIwMTktMDctMTBUMDY6MzU6NDUuMzUyWiIsIl9fdiI6MH0sImlhdCI6MTU2Mjg0MzQ0N30.NwZ9ZygXnAYq-FGT-49uONKaorY1aiNWmirhj3MgMsI"
}

Request body:


  {
    "toWallet":"0x43192C1220Fe7632918d2bFEF8c6b8B8E55FeeCB",
    "amount":2
  }

Response:


{
    "msg": "Ether D transfer successful"
}

This endpoint allows users or applications to transfer ethers from their own wallet to another wallet.

HTTP request

POST https://app.dappros.com/v1/ethers/transfer

Request headers

Parameter Value Description
Content-Type application/json Content type of request body
Authorization (required) JWT security token provided to user while logging into Dappros Platform or application JWT security token provided while adding an app to Dappros Platform

Request body

Parameter Value Description
toWallet String (required) Wallet address of wallet to which ethers are to be transferred
amount Number (required) Amount of ethers to be transferred

Blockchain explorer API

Fetch blockchain transactions

Example 1 (URL):

https://app.dappros.com/v1/explorer/transactions?tokenId=ERC20&walletAddress=0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf&limit=3

Response:

[
    "success": true,
    "transactions": [
        {
            "_id": "5d29dfe7943dff41eb994414",
            "tokenId": "ERC20",
            "transactionHash": "0xa12aee04cd786d75a0a7c7926e409e6f99b1950aa0e4e303715c09a676f5971b",
            "blockNumber": 240,
            "from": "0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf",
            "to": "0xF7Ed73F2bFBA6Cc8Fa613357eD0A8579728b1B43",
            "tokenName": "Platon Token",
            "value": 100,
            "type": "Burn",
            "timestamp": "2019-07-13T13:43:02.000Z",
            "__v": 0
        },
        {
            "_id": "5d29df64943dff41eb99440f",
            "tokenId": "ERC20",
            "transactionHash": "0xa904f41cf4da090f6ff84bd61d448682b7d5773d417bb1ca1817011129daa7d7",
            "blockNumber": 239,
            "from": "0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf",
            "to": "0xF7Ed73F2bFBA6Cc8Fa613357eD0A8579728b1B43",
            "tokenName": "Platon Token",
            "value": 100,
            "type": "Burn",
            "timestamp": "2019-07-13T13:39:39.000Z",
            "__v": 0
        },
        {
            "_id": "5d29d98871b1004159bbde26",
            "tokenId": "ERC20",
            "transactionHash": "0x9fa053d681921c68db08972e54c79f090f23a5a70f2c0debcd4215cf4aba1b0d",
            "blockNumber": 238,
            "from": "0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf",
            "to": "0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf",
            "tokenName": "Platon Token",
            "value": 500,
            "type": "Mint",
            "timestamp": "2019-07-13T13:15:04.000Z",
            "__v": 0
        }
    ]
]

Example 2 (URL):

https://app.dappros.com/v1/explorer/transactions/
0xbcd07b5c8487ba0b07cff2af4e41db1430f1e622f85db9edc13815e65c111b10

Response:


{
    "blockHash": "0x503eb403cef054979eccbe24a5ea2f9808857b17b0ca7710e71a484a261f16f2",
    "blockNumber": 240,
    "from": "0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf",
    "gas": 90000,
    "gasPrice": "1000000000",
    "hash": "0xbcd07b5c8487ba0b07cff2af4e41db1430f1e622f85db9edc13815e65c111b10",
    "input": "B\u0096lh\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000d",
    "nonce": 41,
    "to": "0xF7Ed73F2bFBA6Cc8Fa613357eD0A8579728b1B43",
    "transactionIndex": 0,
    "value": 100,
    "v": "0xfe9",
    "r": "0xdc2a212829ce4008fc070d63ef39089dc4f0e3c32a788a1e50508dc468bc8238",
    "s": "0x3c00741087226c794382377488ce570c6a8e99d8c5251986d1cc51faf93c6d64",
    "timestamp": "2019-07-13T13:43:02.000Z",
    "tokenName": "Platon Token"
}

This endpoint allows a user to fetch blockchain transactions. This endpoint includes pagination.

HTTP request

GET https://app.dappros.com/v1/explorer/transactions/{transactionHash}

URL parameters

Parameter Value Description
transactionHash String (optional) Transaction hash of transaction (To be provided only when requesting a particular transaction)

URL query parameters

Parameter Description
tokenId Token type like ERC20 based on which transactions are to be filtered
walletAddress Wallet address of wallet based on which transactions are to filtered
contractAddress Contract address of contract based on which transactions are to be filtered
tokenName Token name based on which transactions are to be filtered
limit number of transactions to be provided in response
offset number of transactions to skip. Transactions are stored in natural order and skipped based on same order

Fetch block objects

Example URL: https://app.dappros.com/v1/explorer/blocks/50

Response:

[
    {
        "difficulty": "131072",
        "extraData": "0xd88301081b846765746888676f312e31302e34856c696e7578",
        "gasLimit": 2204951,
        "gasUsed": 74002,
        "hash": "0x4bbd7fed8769b33c51b6b086193fc743a81a32e89ae2d120e8ce5b80452ee5e2",
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000020000000000008000000000000000000080000000000000000000000000000020000000000000000000800000000000020400000000010000000000000000000000000000000000000000000000000200000000000000000000000000080000000000000000000000000000000000000000400000000000000000000000002000000000000000000000000000000000000000000000000000020000000020000000000000000000000000000000000000000000000000000000000",
        "miner": "0xc5a977a5aA41Ca9440b7384F3095216fC27d5699",
        "mixHash": "0x7f245ac3065a4c2c99ed95457210ea714c99c3691aae928d48bed8249b336663",
        "nonce": "0x5b7408503b57209a",
        "number": 50,
        "parentHash": "0xc44db47c60b4bbb37594ba7f2d44d2dd94924fb76008137dc4e9312b20eb483d",
        "receiptsRoot": "0xc839158823745974f4de11ecf89aab148197717170ea7b41131aef079e07d2a1",
        "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
        "size": 826,
        "stateRoot": "0x4d1261940a15968afb91e847327f7e45d86e9c6727abfe46881fc1ed93e2be2c",
        "timestamp": 1559977830,
        "totalDifficulty": "6554880",
        "transactions": [
            "0x2a1742625616f599284fd6a71e9c98c720ec5098dbe2ef148b47d76e13716473",
            "0x2932569061a8618cc5c455b159e33631accbe59231e70c6c75139959d0a054ab"
        ],
        "transactionsRoot": "0xed237ab83f2f6984aaeef8f3cb945909319171cb1dbf95eecb6467c3259f6416",
        "uncles": []
    }

]

This endpoint allows a user to fetch block objects from blockchain. This endpoint includes pagination.

HTTP request

GET https://app.dappros.com/v1/explorer/blocks/{blockNumber}

URL parameters

Parameter Value Description
blockNumber Integer (optional) Block number of blockchain

URL query parameters

Parameter Description
limit number of block objects to be provided in response
offset Block number from which blocks are to be provided. Do not provide if block objects are required from latest block

Fetch transaction count

Example 1

URL: https://app.dappros.com/v1/explorer/count (To fetch all transactions)

Response: 46

Example 2

URL: https://app.dappros.com/v1/explorer/count?walletAddress=0x1BcfF3d0C56A429791F7e934bfa2bc2cc71A81c9

Response: 17

This endpoint allows a user to fetch transaction count.

HTTP request

GET https://app.dappros.com/v1/explorer/count

URL query parameters

Parameter Value Description
tokenId String (optional) Token type like ERC20
walletAddress String (optional) Wallet address of wallet
contractAddress String (optional) Contract Address of contract
tokenName String (optional) Token name of ERC token

Wallets API

Fetch token and ether balance

Example URL_1: https://app.dappros.com/v1/wallets/balance/0x18527D95181fdaFe2faab70676A1e1107ee4440f

Response:

[
    {
        "success":true,
        "balance":
        [
            {
                "tokenName":"DemoT",
                "tokenSymbol":"DT",
                "balance":2000
            },
            {
                "tokenName":"Etherium1",
                "tokenSymbol":"ETH1",
                "balance":180
            },
            {
                "tokenName":"Dappros",
                "tokenSymbol":"DPP",
                "balance":0
            },
            {
                "tokenName":"Ether D",
                "tokenSymbol":"ETHD",
                "balance":"9.930506554"
            }
        ],
        "defaultToken":"DemoT"
    }
]

Example URL_2: https://app.dappros.com/v1/wallets/balance/0x18527D95181fdaFe2faab70676A1e1107ee4440f/DemoT

Response:

    [
        {
            "success": true,
            "balance": 2000
        }
    ]

This endpoint allows a user to fetch token and ether balance of a particular wallet. Also how much of a specific token a wallet holds can be retrieved by supplying tokenName parameter. If no tokenName is provided balance of all the tokens in wallet is provided.

HTTP request

GET https://app.dappros.com/v1/wallets/balance/{walletAddress}/{tokenName}

URL parameters

Parameter Value Description
walletAddress String (required) Wallet address of wallet
tokenName String (optional) Name of specific token whose balance is required or it can also be specified as Ether D to retrieve ether balance of the wallet

Fetch wallets of user

Request Headers:

{
    "Authorization":   "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRh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mU"
}

Response for URL: http://localhost:8006/v1/wallets

[
    {
        "success": true,
        "wallets": [
            {
                "accountName": "taras's Wallet",
                "walletAddress": "0x43192C1220Fe7632918d2bFEF8c6b8B8E55FeeCB",
                "etherBalance": "10"
            },
            {
                "accountName": "My testApp Wallet",
                "walletAddress": "0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf",
                "etherBalance": "9.977606419"
            }
        ]
    }
]

Resoponse for URL: http://localhost:8006/v1/wallets/5d0dd93bc449d43c47a8805a

[
    {
        "success": true,
        "token": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMGRkOTNiYzQ0OWQ0M2M0N2E4ODA1YSIsImFwcE5hbWUiOiJ0ZXN0QXBwIiwiYXBwRGVzY3JpcHRpb24iOiJ1bmRlZmluZWQiLCJhcHBVcmwiOiJ1bmRlZmluZWQiLCJhcHBMb2dvSGFzaCI6bnVsbCwiY3JlYXRlZEF0IjoiMjAxOS0wNi0yMlQwNzozMTowNy41ODhaIiwiX192IjowLCJpZEhhc2giOiIkMmEkMTAkb3BMSmg1YVVWUWVEdlhUdjBwYWFKdTE2NHRJQmxNVW5XNGZOdFl3RDhGTFlDMFRxVFJLNG0ifSwiaWF0IjoxNTYzMTA2MzQ3fQ.mtPHS7LwPBB8RQ4-2j2zM7SDxfEOJ--8j7PPqz7YIBA",
        "defaultWallet": {
            "accountName": "My testApp Wallet",
            "walletAddress": "0x7DcB921a254F6d7113dCDFC9063EBD16d3cD4ebf"
        }
    }
]

This endpoint allows an authenticated user to get all the wallets related to a user. If optional parameter appId is provided then business logic checks whether user owns the app with particular appId and if user owns the app, new app JWT security token is provided in the response of the request along with wallet data.

HTTP request

GET https://app.dappros.com/v1/wallets/{appId}

Request headers

Parameter Value Description
Authorization (required) JWT security token of user (app owner account)

URL paraameters

Parameter Value Description
appId MongoDB _id of app object (optional) Id of app object to identify app uniquely. To be provided when user needs new JWT security token for application.

Apps API

Create an app object

Request headers:

    {
        "Content-Type":"application/json",
        "Authorization":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZydzIFdhbGxldCIsIndhbGxldEFkZHJlc3MiOiIweDQzMTkyQzEyMjBGZTc2MzI5MThkMmJGRUY4YzZiOEI4RTU1RmVlQ0IifSwidGFncyI.6W10sImRlZmF1bHRBcHAiOiI1ZDBkZDkzYmM0NDlkNDNjNDdhODgwNWEiLCJfaWQiOi"
    }

Request body:

    {
        "appName":"Crypto Exchange",
        "appDescription":"Provides exchage APIs for crypto currency",
        "appUrl":"www.cryptoexchange.com"
    }

Response:

    [
        {
            "success": true,
            "msg": "Registered App",
            "token": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjVkMmMxN2YzNDEzY2E5MjRkYjM0YzA2NyIsImFwcE5hbWUiOiJDcnlwdG8gRXhjaGFuZ2UiLCJhcHBEZXNjcmlwdGlvbiI6IlByb3ZpZGVzIGV4Y2hhbmdlIEFQSXMgZm9yIGNyeXB0byBjdXJyZW5jeSIsImFwcFVybCI6Ind3dy5jcnlwdG9leGNoYW5nZS5jb20iLCJhcHBMb2dvSGFzaCI6bnVsbCwiY3JlYXRlZEF0IjoiMjAxOS0wNy0xNVQwNjowNjo0My40MDBaIiwiX192IjowLCJyYW5kb21TdHJpbmciOiJnQ1JWeHZMTXkrTVl6VlZjcTZoMzZYOVFCSXI2N0hieVFid0ZNeHFaZnluQ2lyd3ZXc3E2ejNVRzEzUEcxMlBSV1hkbUpnRkNiZnN0YnJTQUJZQVYwMEx4V3lGN0xTMlQ0Mmx2dExMYWtyTnlwVUM2SXkxYUFIRWo5OTU1ZFIwaWJQSWFObXl5RzdIUjlOSTRDK0FBNG1pOFVLeDNkSUZRTU1RS0tqL1FLYmV5VkdPemkzYjJPcG1JQ091KzhTcmwyRGs3eWNjWjZvTyJ9LCJpYXQiOjE1NjMxNzA5MTV9.lBpH8MJzvnWHbaXhd7Xtvu_UrVmd10-K12RxOEa9YqM",
            "app": {
                "_id": "5d2c17f3413ca924db34c067",
                "appName": "Crypto Exchange",
                "appDescription": "Provides exchange APIs for crypto currency",
                "appUrl": "www.cryptoexchange.com",
                "appLogoHash": null,
                "createdAt": "2019-07-15T06:06:43.400Z",
                "__v": 0
                   }
        }
    ]

This end point allows a user (with app owner access) to add application to Dappros Platform

HTTP request

POST https://app.dappros.com/v1/apps

Request headers

Parameter Value Description
Content-Type application/json Content Type of Request Body (should be omitted if providing form data and form data contains image to be uploaded as application icon)
Authorization (required) JWT security token provided to user (with app owner access) while logging into Dappros Platform.

Request body

Parameter Value Description
appName String (required)(unique) Name of application to be added to Dappros Platform
appDescription String (optional) Description of application
appUrl String (optional) Url of application (url of webapp)
file (input element name should be file) Image file Image file to be provided for app logo

Update an app object

Example URL: https://app.dappros.com/v1/apps/5d2c17f3413ca924db34c067

Request headers:

    {
        "Content-Type":"application/json",
        "Authorization":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZydzIFdhbGxldCIsIndhbGxldEFkZHJlc3MiOiIweDQzMTkyQzEyMjBGZTc2MzI5MThkMmJGRUY4YzZiOEI4RTU1RmVlQ0IifSwidGFncyI.6W10sImRlZmF1bHRBcHAiOiI1ZDBkZDkzYmM0NDlkNDNjNDdhODgwNWEiLCJfaWQiOi"
    }

Request body:

    {
        "appName":"Crypto Ledger",
        "appDescription":"Provides exchage APIs for crypto currency",
        "appUrl":"www.cryptoexchange.com"
    }

Response:

    [
        {
    "success": true,
    "msg": "App updated successfully",
    "Apps": [
        {
            "_id": "5d2310eecc168a2ae09dfcd5",
            "appName": "Test App DAPP",
            "appDescription": "null",
            "appUrl": "null",
            "appLogoHash": null,
            "createdAt": "2019-07-08T09:46:22.045Z",
            "__v": 0    
        },
        {
            "_id": "5d2587414b82a86645270e5c",
            "appName": "TraceyChain",
            "appDescription": "Asset tracking application",
            "appUrl": "www.traceychain.com",
            "appLogoHash": null,
            "createdAt": "2019-07-10T06:35:45.352Z",
            "__v": 0
        },
        {
            "_id": "5d1dacf3b534bd121b5035f5",
            "appName": "test App Dappros",
            "appDescription": "undefined",
            "appUrl": "undefined",
            "appLogoHash": null,
            "createdAt": "2019-07-04T07:38:27.569Z",
            "__v": 0
        },
        {
            "_id": "5d2c17f3413ca924db34c067",
            "appName": "Crypto Ledger",  // <- This entry has been updated
            "appDescription": "Provides exchange APIs for crypto currency",
            "appUrl": "www.cryptoexchange.com",
            "appLogoHash": null,
            "createdAt": "2019-07-15T06:54:37.029Z",
            "__v": 0
        }
    ]
}

    ]

This end point allows a user (app owner) to update an app object using MongoDB id of an application. It is recommended to use Dappros Platform interface to easily perform this action.

HTTP request

PUT https://app.dappros.com/v1/apps/{id}

Request headers

Parameter Value Description
Content-Type application/json Content Type of Request Body
Authorization (required) JWT security token provided to user (with app owner access) while logging into Dappros Platform.

URL parameters

Parameter Value Description
id MongoDB_id of app object (required) Id of app object to identify app uniquely.

Request body

Parameter Value Description
appName String (unique) Name of application to be added to Dappros Platform
appDescription String Description of application
appUrl String Url of application (url of webapp)

Get a particular app object

Example URL: https://app.dappros.com/v1/apps/5d2587414b82a86645270e5c

Request headers:

    {
        "Content-Type":"application/json",
        "Authorization":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZydzIFdhbGxldCIsIndhbGxldEFkZHJlc3MiOiIweDQzMTkyQzEyMjBGZTc2MzI5MThkMmJGRUY4YzZiOEI4RTU1RmVlQ0IifSwidGFncyI.6W10sImRlZmF1bHRBcHAiOiI1ZDBkZDkzYmM0NDlkNDNjNDdhODgwNWEiLCJfaWQiOi"
    }

Response:

    [
        {
    "success": true,
    "app": {
        "_id": "5d2587414b82a86645270e5c",
        "appName": "TraceyChain",
        "appDescription": "Asset tracking application",
        "appUrl": "www.traceychain.com",
        "appLogoHash": null,
        "createdAt": "2019-07-10T06:35:45.352Z",
        "__v": 0
            }

        }

    ]

This end point allows to get a particular app object using id of application.

HTTP request

GET https://app.dappros.com/v1/apps/{id}

Request headers

Parameter Value Description
Content-Type application/json Content Type of Request Body
Authorization (required) JWT security token provided to user (with app owner access) while logging into Dappros Platform.

URL parameters

Parameter Value Description
id MongoDB_id of app object (required) Id of app object to identify app uniquely.

Delete an app object

Example URL: https://app.dappros.com/v1/apps/5d2c17f3413ca924db34c067

Request headers:

    {
        "Content-Type":"application/json",
        "Authorization":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3VudE5hbWUiOiJkZWVwYW5zaHUuZ2FyZydzIFdhbGxldCIsIndhbGxldEFkZHJlc3MiOiIweDQzMTkyQzEyMjBGZTc2MzI5MThkMmJGRUY4YzZiOEI4RTU1RmVlQ0IifSwidGFncyI.6W10sImRlZmF1bHRBcHAiOiI1ZDBkZDkzYmM0NDlkNDNjNDdhODgwNWEiLCJfaWQiOi"
    }

Response:

    [
        {
            "success": true,
            "msg": "App removed successfully"
        }
    ]

This end point allows a user (app owner) to delete an app object using MongoDB id of an application.

HTTP request

DELETE https://app.dappros.com/v1/apps/{id}

Request headers

Parameter Value Description
Content-Type application/json Content Type of Request Body
Authorization (required) JWT security token provided to user (with app owner access) while logging into Dappros Platform.

URL parameters

Parameter Value Description
id MongoDB_id of app object (required) Id of app object to identify app uniquely.

Owner2Apps API

Get all app objects of a user

Example:

{
    "Authorization":   "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImRlZmF1bHRXYWxsZXQiOnsiYWNjb3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ciOiJ2NGw3d0ZhWGxIa2lLdW85TVJzNFNJYWRrZGhyNkNITEphMlNsOEx1bXVueWlxd05wZ0ZUWGVUVWJ5UmRMVjZUMndpVkJtMFhTSm5uVlJ2Z00yQ2xhcjJVM0xXdVA5MXJSSW5VZWl3dXlZSExEdTJCN3Z1SCJ9LCJpYXQiOjE1NjMxODg5ODMsImV4cCI6MTU2MzI3NTM4M30.wUwMYEjDrxscMMfCgzq_agdYoEBxE5lyA8-SqJbpfdU"
}

Response:

[

{
    "success": true,
    "Apps": [
        {
            "_id": "5d2310eecc168a2ae09dfcd5",
            "appName": "Test App DAPP",
            "appDescription": "null",
            "appUrl": "null",
            "appLogoHash": null,
            "createdAt": "2019-07-08T09:46:22.045Z",
            "__v": 0
        },
        {
            "_id": "5d1dacf3b534bd121b5035f5",
            "appName": "test App Dappros",
            "appDescription": "undefined",
            "appUrl": "undefined",
            "appLogoHash": null,
            "createdAt": "2019-07-04T07:38:27.569Z",
            "__v": 0
        },
        {
            "_id": "5d2587414b82a86645270e5c",
            "appName": "TraceyChain",
            "appDescription": "Asset tracking application",
            "appUrl": "www.traceychain.com",
            "appLogoHash": null,
            "createdAt": "2019-07-10T06:35:45.352Z",
            "__v": 0
        }
    ]
}

]

This end point allows to get all the app objects a particular user (app owner) owns.

HTTP request

GET https://app.dappros.com/owner2apps

Request headers

Parameter Value Description
Authorization (required) JWT security token provided to user (with app owner access) while logging into Dappros Platform.

Errors

The Dappros API uses the following error codes:

Error Code Meaning
200 OK -- Request is successful.
400 Bad Request -- Your request is invalid or not all required fields are provided.
401 Unauthorized -- If JWT token invalid or JWT token is not supplied.
409 Conflict -- If resource with same email or username already exists.
500 Internal Server Error -- If any preconditions are not met or any server error occurs