# Nodes API

This Nodes API reference guide describes the endpoints to access Bloq Nodes services and manage your Bloq Nodes.

TIP

Clusters utilize the same API as Bloq Nodes. To interact with your node clusters, change the /nodes/ path in the API URL to /clusters/.

# GET /chains

This resource lists the chains and versions available for creating new nodes.

# Responses

Status Meaning Description
200 OK Successful operation

# Example responses

200 Response

[
  {
    "chain": "bch",
    "network": "mainnet",
    "software": "abc-0.19"
  },
  {
    "chain": "bch",
    "network": "testnet",
    "software": "abc-0.19"
  },
  {
    "chain": "btc",
    "network": "mainnet",
    "software": "core-0.17"
  },
  {
    "chain": "btc",
    "network": "testnet",
    "software": "core-0.17"
  },
  {
    "chain": "etc",
    "network": "mainnet",
    "software": "multigeth-1.9"
  },
  {
    "chain": "eth",
    "network": "mainnet",
    "software": "geth-1.8"
  },
  {
    "chain": "ltc",
    "network": "testnet",
    "software": "litecoin-0.17"
  },
  {
    "chain": "ltc",
    "network": "mainnet",
    "software": "litecoin-0.17"
  }
]

# Code sample

curl -X GET https://nodes.bloq.cloud/chains

# POST /users/me/nodes

This resource creates a new node.

# Parameters

Name In Type Required Description
image body string true Blockchain id. btc, bch, ltc, btctestnet, bchtestnet, ltctestnet, eth and etc are currently supported
large body boolean false Set true to request a larger/faster node.
jwt body boolean false Use jwt Bearer token for auth.

Body parameter

{
  "image": "btc",
  "large": false,
  "jwt:" false
}

# Responses

Status Meaning Description
200 OK Successful operation

# Example responses

200 Response

{
  "user": "user-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "id": "node-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "image": "btc",
  "version": "core-0.17",
  "state": "started",
  "nodeUser": "xxxxxxxxxx",
  "nodePass": "xxxxxxxxxx",
  "instance": {
    "vendor": "aws",
    "id": "i-032155ff0235d2dbb",
    "imageId": "ami-021e0f4b36b068ccb",
    "type": "t2.large"
  },
  "startedAt": "2019-03-27T18:40:19.878Z"
}

# Code sample

curl -X POST https://nodes.bloq.cloud/users/me/nodes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer xxxxxx.xxxxxxxxxx.xxxxxx'
  -d '{
	  "image": "btc"
  }'

# GET /users/me/nodes

This resource list created nodes

# Responses

Status Meaning Description Schema
200 OK Successful operation Inline

# Example responses

200 Response

[
  {
    "stoppedAt": "2020-04-21T05:00:18.586Z",
    "serviceData": {
        "amiPrefix": "btc",
        "performance": "standard",
        "software": "core-0.17",
        "ports": [8080,8332]
    },
    "ip": "18.213.193.254",
    "createdAt": "2020-04-21T00:45:07.687Z",
    "ttl": "1588050018",
    "user":"user-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "userPlanData": {
        "startsAt": "2020-04-21T00:45:05.324Z",
        "id": "user-plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "plan": "plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "expiresAt": "2020-05-21T00:45:05.324Z"
    },
    "instance": {
        "region": "us-east-1",
        "id": "i-02cb186c0808950f6",
        "imageId": "ami-01ee6543215d4006b"
    },
    "vendor": {
        "name": "aws",
        "subnet": "subnet-41daba24",
        "securityGroups": [
            "sg-50d39921",
            "sg-0a52e56ee0c02fd7a",
            "sg-784d5703", 
            "sg-0769b9650222e64ce"
        ],
        "region": "us-east-1",
        "instanceType": "t3.large",
        "quickSync": true
    },
    "network": "mainnet",
    "state": "stopped",
    "service": "service-f409a426-8bdd-5c65-bcd3-7c6d0424a5ac",
    "auth": {
        "type": "basic",
        "user": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "updatedAt": "2020-04-21T00:45:09.419Z",
    "chain": "btc",
    "id": "node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  },
  {
    "stoppedAt": "2020-04-21T05:00:18.586Z",
    "serviceData": {
        "amiPrefix": "btc",
        "performance": "standard",
        "software": "core-0.17",
        "ports": [8080,8332]
    },
    "ip": "18.213.193.254",
    "createdAt": "2020-04-21T00:45:07.687Z",
    "ttl": "1588050018",
    "user":"user-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "userPlanData": {
        "startsAt": "2020-04-21T00:45:05.324Z",
        "id": "user-plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "plan": "plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "expiresAt": "2020-05-21T00:45:05.324Z"
    },
    "instance": {
        "region": "us-east-1",
        "id": "i-02cb186c0808950f6",
        "imageId": "ami-01ee6543215d4006b"
    },
    "vendor": {
        "name": "aws",
        "subnet": "subnet-41daba24",
        "securityGroups": [
            "sg-50d39921",
            "sg-0a52e56ee0c02fd7a",
            "sg-784d5703",
            "sg-0769b9650222e64ce"
        ],
        "region": "us-east-1",
        "instanceType": "t3.large",
        "quickSync": true
    },
    "network": "mainnet",
    "state": "stopped",
    "service": "service-f409a426-8bdd-5c65-bcd3-7c6d0424a5ac",
    "auth": {
        "type": "basic",
        "user": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "updatedAt": "2020-04-21T00:45:09.419Z",
    "chain": "btc",
    "id": "node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
]

# Code sample

curl -X GET https://nodes.bloq.cloud/users/me/nodes \
  -H 'Authorization: Bearer xxxxxx.xxxxxxxxxx.xxxxxx'

# GET /users/me/nodes/{id}

This resource fetches a node by ID.

# Responses

Status Meaning Description Schema
200 OK Successful operation Inline

# Example responses

200 Response

{
  "stoppedAt": "2020-04-21T05:00:18.586Z",
  "serviceData": {
    "amiPrefix": "btc",
    "performance": "standard",
    "software": "core-0.17",
    "ports": [8080,8332]
  },
  "ip": "18.213.193.254",
  "createdAt": "2020-04-21T00:45:07.687Z",
  "ttl": "1588050018",
  "user":"user-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "userPlanData": {
    "startsAt": "2020-04-21T00:45:05.324Z",
    "id": "user-plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "plan": "plan-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "expiresAt": "2020-05-21T00:45:05.324Z"
  },
  "instance": {
    "region": "us-east-1",
    "id": "i-02cb186c0808950f6",
    "imageId": "ami-01ee6543215d4006b"
  },
  "vendor": {
    "name": "aws",
    "subnet": "subnet-41daba24",
    "securityGroups": [
        "sg-50d39921",
        "sg-0a52e56ee0c02fd7a",
        "sg-784d5703",
        "sg-0769b9650222e64ce"
    ],
    "region": "us-east-1",
    "instanceType": "t3.large",
    "quickSync": true
  },
  "network": "mainnet",
  "state": "stopped",
  "service": "service-f409a426-8bdd-5c65-bcd3-7c6d0424a5ac",
  "auth": {
  "type": "basic",
  "user": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "updatedAt": "2020-04-21T00:45:09.419Z",
  "chain": "btc",
  "id": "node-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

# Code sample

curl -X GET https://nodes.bloq.cloud/users/me/nodes/node-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
  -H 'Authorization: Bearer xxxxxx.xxxxxxxxxx.xxxxxx'

# DELETE /users/me/nodes/{id}

This resource removes a node by ID.

# Responses

Status Meaning Description Schema
200 OK Successful operation Inline

# Code sample

curl -X DELETE https://nodes.bloq.cloud/users/me/nodes/node-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
  -H 'Authorization: Bearer xxxxxx.xxxxxxxxxx.xxxxxx'
Last updated: 5/18/2020, 11:56:24 PM