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 Aggregators

Create Aggregators

Use the POST method to create an aggregator in EDS.

POST Request in JSON Format

Generate a POST request. For example, the following POST request creates an aggregator:
POST /api/dataflows Content-Type: application/json Accept: application/json

POST Body in JSON Format

{ "config": { "description": "", "eventQueueSize": 100000, "topicName": "", "topicDescription": "", "topicExpiresIn": "600000", "topicResponderAccess": "NAMED_PROPERTIES" }, "stats": [ { "name": "Bytes Received", "value": 10501, "type": 101 }, { "name": "Events Received", "value": 10503, "type": 101 }, { "name": "Receive Rate(Per Sec)", "value": 10504, "type": 101 }, { "name": "Bytes Sent", "value": 10001, "type": 101 }, { "name": "Events Sent", "value": 10003, "type": 101 }, { "name": "Send Rate(Per Sec)", "value": 10005, "type": 101 }, { "name": "Events Reassigned", "value": 10505, "type": 101 }, { "name": "Events to be Processed", "value": 10601, "type": 101 }], "name": "aggregator2", "pluginId": "_VDS_AGGREGATOR", "topics": [], "topicProperties": [] }

POST Response in JSON Format

The following is a sample response for the 201 Created code:
{ "id": 4, "name": "aggregator2", "self": { "rel": "self", "href": "api/dataflows/1/aggregator/4", "title": "aggregator2", "id": 4 }, "dataflow": { "rel": "dataflow", "href": "api/dataflows/1", "title": "Data flow", "id": 1 }, "type": "AGGREGATOR", "valid": true, "createDate": "2015-07-22T02:17:02-07:00", "createdBy": "Administrator", "predefined": false, "deployable": true, "deploymentState": "DRAFT", "force": false, "pluginId": "_VDS_AGGREGATOR", "schedulable": false, "config": { "topicExpiresIn": "600000", "topicDescription": "", "description": "", "topicResponderAccess": "NAMED_PROPERTIES", "eventQueueSize": "100000", "topicName": "", }, "stats": [ { "name": "Bytes Received", "value": 10501, "type": 101 }, { "name": "Events Received", "value": 10503, "type": 101 }, { "name": "Receive Rate(Per Sec)", "value": 10504, "type": 101 }, { "name": "Bytes Sent", "value": 10001, "type": 101 }, { "name": "Events Sent", "value": 10003, "type": 101 }, { "name": "Send Rate(Per Sec)", "value": 10005, "type": 101 }, { "name": "Events Reassigned", "value": 10505, "type": 101 }, { "name": "Events to be Processed", "value": 10601, "type": 101 }], "topics": [], "topicProperties": [] } }
The following are sample responses for the 400 Bad Request code:
{ "success": false, "errors": [ { "code": AGGREGATOR_NAME_FIELD_NOT_FOUND, "parameters": null, "errorMessage": "'name' field is missing in request" } ] } { "success": false, "errors": [ { "code": AGGREGATOR_NAME_ALREADY_EXISTS, "parameters": null, "errorMessage": "Aggregator 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 aggregator. Exception: {error-message}" } ] }

0 COMMENTS

We’d like to hear from you!