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

Retrieve All Sources

Retrieve All Sources

Use the GET method to retrieve all sources in EDS.

GET Request in JSON Format

Generate a GET request. For example, the following GET request retrieves all sources:
GET /api/dataflows/{dataflow-id}/sources Content-Type: application/json Accept: application/json

GET Response in JSON Format

The following is the sample response for the 200 OK code when there are no sources:
{ "success": true, "total": 0, "count": 0, "items": [] }
The following is a sample response when there is one source in the data flow:
{ "total": 1, "count": 1, "success": true, "items": [ { "id": {source-entity-id}, "name": "TestSysLogTCP", "type": "SOURCE", "pluginId": "_VDS_SRC_SYSLOG_TCP", "self": { "rel": "self", "href": "api/dataflows/{dataflow-id}/sources/{source-entity-id}", "title": "TestSysLogTCP", "id": {source-entity-id} }, "dataflow": { "rel": "dataflow", "href": "api/dataflows/{dataflow-id}", "title": "TestDataflow", "id": {dataflow-id} }, "valid": true, "createDate": "2015-07-06T14:55:48+05:30", "createdBy": "Administrator", "predefined": false, "deployable": true, "deploymentState": "DRAFT", "force": false, "schedulable": false, "config": { "delimiter": "0", "eventSize": "8192", "persistEvents": "false", "persistOptions": "# --\n# The interval in milliseconds after which the writes \n# are flushed to disk.\n# --\n#flushInterval=5000\n\n# --\n# The maximum number of db files to keep\n# --\n#maxDataFiles=10\n\n# --\n# Size of individual db file in bytes after which the files are rolled over\n# --\n#maxDataFileSize=1073741824\n\n# --\n# The max size of unsent data in bytes. If 0, it is unbounded\n# --\n#maxQueueSizeInBytes=0\n\n# --\n# The batch size in bytes up to which the data is buffered before writing to the disk.\n# --\n#batchSizeInBytes=262144" }, "stats": [ {"name": "Bytes Sent","value": 10001,"type": 101}, {"name": "Events Sent","value": 10003,"type": 101}, {"name": "Events to be Sent","value": 10006,"type": 101}, {"name": "Events not Delivered","value": 10002,"type": 101}, {"name": "Send Rate(Per Sec)","value": 10005,"type": 101}, {"name":"Events Dropped","value":1,"type":103}, {"name":"Concurrent Connections","value":2,"type":103}, {"name":"Maximum Concurrent Clients","value":3,"type":103} ] } ] }
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 500 Internal Server Error code:
{ "success": false, "errors": [ { "code": INTERNAL_SERVER_ERROR, "parameters": [{error-message}], "errorMessage": "Failed to get all sources. Exception: {error-message}" } ] }

0 COMMENTS

We’d like to hear from you!