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 Data Connections

Update Data Connections

Use the POST method to update data connections in EDS.

POST Request in JSON Format

Generate a POST request. For example, the following POST request updates a data connection:
POST /api/dataflows/{dataflow-id}/connections/{connection-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 for an Ultra Messaging connection:
{ "name":"um_connection1_updated", "type":"_VDS_UM_TRANSPORT", "resolution":"UNICAST", "daemon":"127.0.0.1:15380", "umMode":"ULB" } { "name":"um_connection1_updated", "type":"_VDS_UM_TRANSPORT", "resolution":"MULTICAST", "address":"224.9.10.11", "umMode":"UMP", "umpStoreName":"testUMPStore" } { "name":"um_connection1", "type":"_VDS_UM_TRANSPORT", "resolution":"MULTICAST", "address":"224.9.10.11", "umMode":"UMP", "umpStoreName":"testUMPStore", "resolverPort":"5489", "requestTcpPort":"5479", "transportTcpPort":"4568", "umConfig":"Advanced UM configuration" }
The following is a sample POST body in JSON format for a WebSocket connection:
{ "name":"ws_connection1_updated", "type":"_VDS_WS_TRANSPORT", "wsMode":"ACKNOWLEDGEMENT", "secure": fasle, "port":"8956", "healthCheckUrl":"status" } { "name":"ws_connection1_updated", "type":"_VDS_WS_TRANSPORT", "messagingMode":"STREAMING", "wsConnectionType":"WSS", "keystorePath":"/data1/crt/keystorepath", "keystore_password":"test_keystore_password", "truststorePath":"/data1/crt/truststorepath", "truststorePassword":"test_truststorePassword", "port":"8956", "healthCheckUrl":"status" } { "name":"ws_connection1_updated", "type":"_VDS_WS_TRANSPORT", "messagingMode":"STREAMING", "wsConnectionType":"WSS", "keystorePath":"/data1/crt/keystorepath", "keystore_password":"test_keystore_password", "truststorePath":"/data1/crt/truststorepath", "truststorePassword":"test_truststorePassword", "port":"8956", "healthCheckUrl":"status", "server":"10.25.45.55", "advancedConfig":"Advanced WS configuration" }

POST Response in JSON Format

The following is a sample response for the 200 OK code for an Ultra Messaging connection:
{ "id": {connection-id}, "success": true, "name":"um_connection1_updated", "type":"_VDS_UM_TRANSPORT", "resolution":"MULTICAST", "daemon":"127.0.0.1:15380", "umMode":"ULB" }
The following is a sample response for the 200 OK code for an WebSocket connection:
{ "id": {connection-id}, "success": true, "name":"ws_connection1_updated", "type":"_VDS_WS_TRANSPORT", "wsMode":"ACKNOWLEDGEMENT", "secure":false, "port":"8956", "healthCheckUrl":"status" }
The following is the sample response for the 404 Not Found code:
{ "success": false, "errors": [ { "code": CONNECTION_NOT_FOUND, "parameters": [{connection-id}], "errorMessage": "Connection with Id: {connection-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": CONNECTION_ALREADY_EXISTS, "parameters": [{error-message}], "errorMessage": "Connection name already exists. Exception: {error-message}" } ] }
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 connection. Exception: {error-message}" } ] }

0 COMMENTS

We’d like to hear from you!