Skip to main content

๐Ÿ“ก Node

A Node processes serverless GreenCloud function requests. Node commands allow you to create nodes and manage node settings.

Createโ€‹

info

We use this endpoint to create a node. We pass in the ID of the node on the URL and a description in the body.

Endpoint: https://api.greencloud.dev/v1/node/hash_of_the_nodeโ€‹

HTTP VERB
POST
Content Header
Authorization, Valid - Access - Token
Body
{
"description" : "A Description of the node"
}

Response:โ€‹

HTTP 201

API Response

Listโ€‹

info

Use this endpoint to get a list of nodes registered to the account. You can get interesting information about the node - for example if it is available or if it is disabled. The endpoint returns an array of JSON objects each object representing a node.

Endpoint: https://api.greencloud.dev/v1/node/listโ€‹

HTTP VERB
GET
Content Header
Authorization, Valid - Access - Token
Body
N / A

Response:โ€‹

HTTP 200

API Response
;[
{
available: false,
description: "dddddddddddddddddd",
disabled: false,
hash: "1a061cfd-df01-4b02-a067-5122c5941e15",
},
]

Deleteโ€‹

info

Call this endpoint with the 'hash' of the node that you wish to remove. Call the list endpoint to find the list of nodes in the account, each node has an associated hash. If there is an associated node for the hash it is removed from the account and a 204 HTTP response is returned.

Endpoint: https://api.greencloud.dev/v1/node/[hash_of_the_node]โ€‹

HTTP VERB
DELETE
Content Header
Authorization, Valid - Access - Token
Body
N / A

Response:โ€‹

HTTP 204

API Response

Restoreโ€‹

info

If the node has been deleted, you can use the restore endpoint to enable it again on the account. Simply pass the hash of the node on the url and if it is found, it will be restored with a 200 HTTP response returned.

Endpoint: https://api.greencloud.dev/v1/node/[hash_of_the_node]โ€‹

HTTP VERB
PATCH
Content Header
Authorization, Valid - Access - Token
Body
N / A

Response:โ€‹

HTTP 200

API Response