Table of Contents

Search

  1. Preface
  2. Introduction to Vibe Data Stream 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

Create Data Connections

Create Data Connections

Use the POST method to create a data connection in VDS.

POST Request in JSON Format

Generate a POST request. For example, the following POST request creates a data connection:
POST /api/dataflows/{dataflow-id}/connections Content-Type: application/json Accept: application/json

POST Body in JSON Format

The following is the sample POST body for a nonsecure Ultra Messaging connection:
{ "name": "SimpleUMConnection", "resolution": "UNICAST", "address": "", "daemon": "127.0.0.1:15380", "umMode": "ULB", "umConnectionType": "UM", "umpStoreName": "", "resolverPort": "", "requestTcpPort": "", "transportTcpPort": "", "umConfig": "", "type": "_VDS_UM_TRANSPORT" }
The following is the sample POST body for a secure Ultra Messaging connection:
{ "name": "SecureUMConnection", "resolution": "UNICAST", "address": "", "daemon": "127.0.0.1:15380", "umMode": "ULB", "umConnectionType": "UMSECURE", "cipherSuites": "", "certificate": "/data1/certs/cert.crt", "certificateKey": "/data1/certs/cert.key", "certificateKeyPassword": "${certKeyPassword}", "trustedCertificates": "/data1/certs/cert.crt", "umpStoreName": "", "resolverPort": "", "requestTcpPort": "", "transportTcpPort": "", "umConfig": "", "type": "_VDS_UM_TRANSPORT" }
The following is the sample POST body for a WebSocket connection:
{ "name": "SampleWSConnection", "messagingMode": "ACKNOWLEDGEMENT", "wsConnectionType": "WS", "keystorePath": "", "keystorePassword": "", "truststorePath": "", "truststorePassword": "", "port": "1234", "healthCheckUrl": "status", "server": "", "advancedConfig": "", "type": "_VDS_WS_TRANSPORT" }

POST Response in JSON Format

The following are sample responses for the 201 Created code:
{{ "id": {connection-id}, "name": "Sample_UM_Connection", "success": true, "type": "_VDS_UM_TRANSPORT", "resolution": "UNICAST", "address": "", "daemon": "127.0.0.1:15380", "umMode": "ULB", "umpStoreName": "", "resolverPort": "", "requestTcpPort": "", "transportTcpPort": "", "umConfig": "" }
{ "id": {connection-id},, "name": "SampleWSConnection", "success": true, "type": "_VDS_WS_TRANSPORT", "wsMode": "ACKNOWLEDGEMENT", "secure": false, "keystorePath": "", "keystore_password": "", "truststorePath": "", "truststorePassword": "", "port": "1234", "healthCheckUrl": "status", "server": "", "advancedConfig": "" }
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": null, "errorMessage": "Connection name already exists." } ] }
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 create connection. Exception: {error-message}" } ] }

0 COMMENTS

We’d like to hear from you!