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 Target Services

Create Target Services

Use the POST method to create a target service in EDS.

POST Request in JSON Format

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

POST Body in JSON Format

Content-Type: application/json Accept: application/json { "name": "TestUMTarget", "pluginId": "_VDS_TGT_UM", "config": {}, "stats": [] }

POST Response in JSON Format

The following is a sample response for the 201 Created code:
{ "id": {target-entity-id}, "name": "TestUMTarget", "type": "TARGET", "pluginId": "_VDS_TGT_UM", "self": { "rel": "self", "href": "api/dataflows/{dataflow-id}/targets/{target-entity-id}", "title": "TestUMTarget", "id": {target-entity-id} }, "dataflow": { "rel": "dataflow", "href": "api/dataflows/{dataflow-id}", "title": "Data flow", "id": {dataflow-id} }, "success": true, "valid": true, "createDate": "2015-07-07T03:21:39-07:00", "createdBy": "Administrator", "predefined": false, "deployable": true, "deploymentState": "DRAFT", "force": false, "schedulable": false, "config": {}, "stats": [] }
The following is a sample response for the 404 Not Found code:
{ "success": false, "errors": [ { "code": DATAFLOW_NOT_FOUND, "parameters": [{dataflow-id}], "errorMessage": "Dataflow with Id: {dataflow-id} not found" } ] }
The following is a sample response for the 400 Bad Request code:
{ "success": false, "errors": [ { "code": NAME_FIELD_MISSING, "parameters": null, "errorMessage": "'name' field is missing in request" } ] }
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 target. Exception: {error-message}" } ] }

0 COMMENTS

We’d like to hear from you!