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

Create Links

Create Links

Use the POST method to create a link in EDS.

POST Request in JSON Format

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

POST Body in JSON Format

The following is a sample body for a link with connection ID:
{ "fromId": 1, "toIds": [2], "connectionId": 3 }
The following is a sample body for a link without connection ID:
{ "fromId": 1, "toIds": [2], }

POST Response in JSON Format

The following is a sample response for the 201 Created code:
{ "id": {link-id}, "success": true, "fromId": {from-entity-id}, "toIds": [ {to-entity-id} ], "connectionId": {connection-entity-id} }
The following is a sample response for the 404 Not Found code:
{ "success": false, "errors": [ { "code": ENTITY_NOT_FOUND, "parameters": [{from-entity-id}], "errorMessage": "Entity with Id: {from-entity-id} not found" } ] }
The following is a sample response for the 400 Bad Request code:
{ "success": false, "errors": [ { "code": LINK_ALREADY_EXISTS, "parameters": [{from-entity-id}, {to-entity-id}], "errorMessage": "Link already exists between from: {from-entity-id} to: {to-entity-id}" } ] }
The following is a sample response for the 500 Internal Server Error code:
{ "success": false, "errors": [ { "code": INTERNAL_SERVER_ERROR, "parameters": [{link-id}, {error-message}], "errorMessage": "Failed to create link Id: {link-id}. Exception : {error-message}." } ] }

0 COMMENTS

We’d like to hear from you!