This endpoint allows you to create and manage nodes.

Request Headers

Content-Type: application/json
Accept: application/json
Authorization: Bearer access_token
Host: example.org
Cookie: 

Request Example Format

curl "http://shares.example.com/system/nodes" -d '"name":"node1","port":9092,"host":"example.com","username":"user","password":"Password123_"}' -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer access_token" \
-H "Host: example.org" \
-H "Cookie: "

Request Parameters

Name Required/Optional Type Description
name Required string Node name
port Optional unsigned integer Port number
host Required string Hostname or IP Address
username Required string Username
password Required string Password
http_fallback_port Optional unsigned integer HTTP fallback port
ssl_enabled Optional boolean Enable SSL
ssl_peer_certificate_verification_enabled Optional boolean Enable SSL peer certificate verification
read_timeout Optional unsigned integer Read timeout
open_timeout Optional unsigned integer Open timeout

Success Response Codes

  • 200 OK
  • 201 Created

Error Response Codes

  • 422 Unprocessable Entity

Example Response Body

{
"errors": {
"port": [
"is not a number"
]
}
}

Response Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' https://local.connectme.us https://d3gcli72yxqn2z.cloudfront.net http://d3gcli72yxqn2z.cloudfront.net
Content-Type: application/json; charset=utf-8
ETag: W/"b68d7ae64d6c75778a2a796c8e66a95e"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 3b088267-49e0-4c8e-91d4-b67799635800
X-Runtime: 0.059142
Content-Length: 265

Response Attributes

Name Type Description
id integer Node ID
name string Node name
port unsigned integer Port number
host string Hostname or IP Address
username string Username
http_fallback_port unsigned integer HTTP fallback port
ssl_enabled boolean Enable SSL
ssl_peer_certificate_verification_enabled boolean Enable SSL peer certificate verification
read_timeout unsigned integer Read timeout
open_timeout unsigned integer Open timeout
status string Status
status_at dateTime Status at
status_message string Status message

List all nodes

GET /system/nodes

Request Example

curl -g "http://shares.example.com/system/nodes" -X GET

Success Response

200 OK
[
{
"id": 92268619,
"name": "test node",
"port": 9092,
"host": "example.com",
"username": "user",
"http_fallback_port": null,
"ssl_enabled": true,
"ssl_peer_certificate_verification_enabled": false,
"read_timeout": 30,
"open_timeout": 10,
"status": null,
"status_at": null,
"status_message": null
}
]


Show specific node

GET /system/nodes/{id}

Request Example

curl -g "http://shares.example.com/system/nodes/92268615" -X GET

Success Response

200 OK
{
"id": 92268615,
"name": "test node",
"port": 9092,
"host": "example.com",
"username": "user",
"http_fallback_port": null,
"ssl_enabled": true,
"ssl_peer_certificate_verification_enabled": false,
"read_timeout": 30,
"open_timeout": 10,
"status": null,
"status_at": null,
"status_message": null
}


Create a new node

POST /system/nodes

Request Example

curl "http://shares.example.com/system/nodes" -d '{"name":"node1","port":9092,"host":"example.com","username":"user","password":"Password123_"}' -X POST

Success Response

201 Created
{
  "id": 92268618,
  "name": "node1",
  "port": 9092,
  "host": "example.com",
  "username": "user",
  "http_fallback_port": null,
  "ssl_enabled": true,
  "ssl_peer_certificate_verification_enabled": false,
  "read_timeout": 30,
  "open_timeout": 10,
  "status": null,
  "status_at": null,
  "status_message": null
}


Error Response Code

422 Unprocessable Entity

Example Response Body

{
  "errors": {
    "port": [
      "is not a number"
    ]
  }
}


Update a node

PUT /system/nodes/{id}

Request Example

curl "http://shares.example.com/system/nodes/92268615" -d '{"name":"test node2","username":"user2"}' -X PUT \
	-H "Content-Type: application/json" \
	-H "Accept: application/json" \
	-H "Authorization: Bearer access_token" \
	-H "Host: example.org" \
	-H "Cookie: "

Success Response

200 OK
{
  "id": 92268615,
  "name": "test node2",
  "port": 9092,
  "host": "example.com",
  "username": "user2",
  "http_fallback_port": null,
  "ssl_enabled": true,
  "ssl_peer_certificate_verification_enabled": false,
  "read_timeout": 30,
  "open_timeout": 10,
  "status": null,
  "status_at": null,
  "status_message": null
}

Error Response

422 Unprocessable Entity

Example Response Body

{
                "errors": {
                  "username": [
                    "can't be blank"
                  ]
                }
              }


Delete a node

DELETE /system/nodes/{id}

Request Example

curl "http://shares.example.com/system/nodes/92268615" -d '' -X DELETE

Success Response

204 No Content

Error Response

422 Unprocessable Entity
{
          "errors": {
          "base": [
            "Cannot delete record because dependent shares exist"
          ]
          }
          }

Video player

Video

×