Table of Contents

Search

  1. Preface
  2. Introduction to Edge Data Streaming Custom Entity Types
  3. Managing Custom Entity Types
  4. Custom Entities from Maven Archetypes
  5. REST APIs
  6. HTTP Request and Response Parameters
  7. Sample JSON Requests and Responses
  8. Glossary

Developer Guide

Developer Guide

Update Node Groups

Update Node Groups

Use the POST method to update a node group in EDS.

POST Request in JSON Format

Generate a POST request. For example, the following POST request updates a node group:
POST /api/nodegroups/{nodegroup-id} Content-Type: application/json Accept: application/json x-http-method-override: PUT

POST Body in JSON Format

The following is a sample POST body in JSON format:
{ "name": "TestNodeGroupChnaed", "type": "STATIC", "nodes": [3, 8] }

POST Response in JSON Format

The following are sample responses for the 200 OK code:
{ "id": {nodegroup-id}, "name": {nodegroup-name}, "success": true, "type": "STATIC", "nodes": [{"id": {node-id}, "name": {node-name}}] }
{ "id": {nodegroup-id}, "name": {nodegroup-name}, "success": true, "type": "dynamic", "pattern": {node-pattern-regex}, "nodes": [{"id": {node-id}, "name": {node-name}}] }
The following are sample responses for the 404 Not Found code:
{ "success": false, "errors": [ { "code": NODEGROUP_NOT_FOUND, "parameters": [{nodegroup-id}], "errorMessage": "Nodegroup with Id: {nodegroup-id} not found" } ] }
{ "success": false, "errors": [ { "code": NODE_NOT_FOUND, "parameters": [{node-id}], "errorMessage": "Node with Id: {node-id} not found" } ] }
The following are sample responses for the 400 Bad Request code:
{ "success": false, "errors": [ { "code": NAME_FIELD_MISSING, "parameters": null, "errorMessage": "'name' field is missing in request" } ] }
{ "success": false, "errors": [ { "code": CANNOT_CHANGE_NODEGROUP_TYPE, "parameters": null, "errorMessage": "Cannot change nodegroup type" } ] }
The following is a sample response for the 500 Internal Server Error code:
{ "success": false, "errors": [ { "code": INTERNAL_SERVER_ERROR, "parameters": [{error-message}], "errorMessage": "Failed to update node group. Exception : {error-message}." } ] }

0 COMMENTS

We’d like to hear from you!