blob: b569adeeb3d137e4470b4d4c6f8e43513dfa31a3 [file] [log] [blame]
---++ GET /api/entities/list/:entity-type?fields=:fields
* <a href="#Description">Description</a>
* <a href="#Parameters">Parameters</a>
* <a href="#Results">Results</a>
* <a href="#Examples">Examples</a>
---++ Description
Get list of the entities.
---++ Parameters
* :entity-type Valid options are cluster, feed or process.
* fields <optional param> Fields of entity that the user wants to view, separated by commas.
* Valid options are STATUS, TAGS, PIPELINES.
* filterBy <optional param> Filter results by list of field:value pairs. Example: filterBy=STATUS:RUNNING,PIPELINES:clickLogs
* Supported filter fields are NAME, STATUS, PIPELINES, CLUSTER.
* Query will do an AND among filterBy fields.
* tags <optional param> Return list of entities that have specified tags, separated by a comma. Query will do AND on tag values.
* Example: tags=consumer=consumer@xyz.com,owner=producer@xyz.com
* orderBy <optional param> Field by which results should be ordered.
* Supports ordering by "name".
* sortOrder <optional param> Valid options are "asc" and "desc"
* offset <optional param> Show results from the offset, used for pagination. Defaults to 0.
* numResults <optional param> Number of results to show per request, used for pagination. Only integers > 0 are valid, Default is 10.
---++ Results
List of the entities.
---++ Examples
---+++ Rest Call
<verbatim>
GET http://localhost:15000/api/entities/list/feed
</verbatim>
---+++ Result
<verbatim>
{
"entity": [
{
"name": "SampleOutput",
"type": "feed"
},
{
"name": "SampleInput",
"type": "feed"
}
]
}
</verbatim>
---+++ Rest Call
<verbatim>
GET http://localhost:15000/api/entities/list/feed?fields=status
</verbatim>
---+++ Result
<verbatim>
{
"entity": [
{
"name" : "SampleOutput",
"type" : "feed",
"status": "RUNNING"
},
{
"name": "SampleInput",
"type": "feed",
"status": "RUNNING"
}
]
}
</verbatim>
---+++ Rest Call
<verbatim>
GET http://localhost:15000/api/entities/list/process?filterBy=STATUS:RUNNING,PIPELINES:dataReplication&fields=status,pipelines,tags&tags=consumer=consumer@xyz.com&orderBy=name&offset=2&numResults=2
</verbatim>
---+++ Result
<verbatim>
{
"entity": [
{
"name" : "SampleProcess1",
"type" : "process",
"status": "RUNNING",
"pipelines": "dataReplication",
"tags": "consumer=consumer@xyz.com"
},
{
"name": "SampleProcess3",
"type": "process",
"status": "RUNNING",
"pipelines": "dataReplication",
"tags": "consumer=consumer@xyz.com,owner=producer@xyz.com"
}
]
}
</verbatim>