Apps

Apps registration

Registers a Blockchain Application.

PUT /api/dapps

Request

 {
  "secret": "Secret of account. String. Required",
  "secondSecret": "Second secret of account. String. Optional",
  "publicKey": "Public key to verify sender secret key. Hex. Optional",
  "category": "DApp category. Integer. Required",
  "name": "DApp name. String. Required",
  "description": "DApp description. String. Optional",
  "tags": "DApp tags. String. Optional",
  "type": "DApp type. Integer. Required (Only type 0 is currently supported)",
  "link": "Link to DApp file. ZIP supported. String. Required",
  "icon": "Link to icon file. PNG and JPG/JPEG supported. String. Optional"
}

Response

 {
  "success": true,
  "transactionId": "transaction id"
}

Example

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","secondSecret":"<INSERT SECOND SECRET HERE>"
"category":<INSERT INTEGER HERE>,"name":"<INSERT APPLICATION NAME HERE>",
"type":0,"link":"<INSERT LINK TO APPLICATION HERE>"}' \
http://localhost:8000/api/dapps

Get Apps

Gets a list of Blockchain Applications registered on the network.

GET /api/dapps?category=category&name=name&type=type&link=link&limit=limit&offset=offset&orderBy=orderBy

  • category: DApp category. (Integer)
  • name: DApp name. (String)
  • type: DApp type. (Integer)
  • link: DApp link. (String)
  • limit: Query limit. Maximum is 100. (Integer)
  • offset: Query offset. (Integer)
  • orderBy: Order by field. (String)

Response

 {
  "success": true,
  "dapps": "array of dapps"
}

Example

curl -k -X GET http://localhost:8000/api/dapps?name=<INSERT APPLICATION NAME HERE>

Get App

Gets a specific Blockchain Application by registered id.

GET /api/dapps/get?id=id

  • id: Id of app

Response

 {
  "success": true,
  "dapp": "dapp object"
}

Example

curl -k -X GET http://localhost:8000/api/dapps/get?id=<id>

Search for Apps

Searches for Blockchain Applications by filter(s) on a node.

GET /api/dapps/search?q=q&category=category&installed=installed

  • q: Search criteria. (String)
  • category: Category to search within. (Integer)
  • installed: Search installed apps only. 1 or 0. (Integer)

Response

 {
  "success": true,
  "dapps": [
    "array of dapps"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/search?installed=1

Install App

Installs a app by id on the node.

POST /api/dapps/install

Request

 {
  "id": "Blockchain Application id to install"
}

Response

 {
  "success": true,
  "path": "dppp install path"
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/install

Installed Apps

Returns a list of installed apps on the requested node.

GET /api/dapps/installed

Response

 {
  "success": "true",
  "dapps": [
    "array of dapps"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/installed

Installed Apps Ids

Returns a list of installed app ids on the requested node.

GET /api/dapps/installedIds

Response

 {
  "success": true,
  "ids": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/installedIds

Uninstall Apps

Uninstalls a app by id from the requested node.

POST /api/dapps/uninstall

Request

 {
  "id": "Blockchain Application id to install"
}

Response

 {
  "success": true
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/uninstall

Launch App

Launches a app by id on the requested node.

POST /api/dapps/launch

Request

 {
  "id": "dapp id to launch",
  "params": "dapp launch params, not required, array"
}

Response

 {
  "success": true
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/launch

Installing

Returns a list of app ids currently being installed on the requested node.

GET /api/dapps/installing

Response

 {
  "success": true,
  "installing": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/installing

Uninstalling

Returns a list of app ids currently being uninstalled on the client node.

GET /api/dapps/uninstalling

Response

 {
  "success": true,
  "uninstalling": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/uninstalling

Launched

Returns a list of app ids which are currently launched on the client node.

GET /api/dapps/launched

Response

 {
  "success": true,
  "launched": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/launched

Categories

Returns a full list of app categories.

GET /api/dapps/categories

Response

 {
  "success": true,
  "category": "object containing category names and ids"
}

Example

curl -k -X GET http://localhost:8000/api/dapps/categories

Stop App

Stops a app by id on the requested node.

POST /api/dapps/stop

Request

 {
  "id": "dapp id to stop"
}

Response

 {
  "success": true
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/stop

What's next?
Multi-signature