Spring Cloud Data Flow offers RESTful APIs around applications, streams, tasks, jobs, and metrics. A complete list can be obtained by sending a GET request to http://localhost:9393/.
The following screenshot shows the response for the GET request:
All the APIs are self-explanatory. Let's look at an example of sending a GET request to http://localhost:9393/streams/definitions:
{
"_embedded":{
"streamDefinitionResourceList":[
{
"name":"process-stock-change-events"
"dslText":"significant-stock-change-source|stock-
intelligence-processor|event-store-sink",
"status":"deployed",
"statusDescription":"All apps have been successfully
deployed",
"_links":{
"self":{
"href":"http://localhost:9393/streams/definitions/
process-stock-change-events"
}
}
}
]
},
"_links":{
"self":{
"href":"http://localhost:9393/streams/definitions"
}
},
"page":{
"size":20,
"totalElements":1,
"totalPages":1,
"number":0
}
}
Important things to note are as follows:
- The API is RESTful. _embedded element contains the data for the request. _links element contains HATEOAS links. The page element contains pagination information.
- _embedded.streamDefinitionResourceList.dslText contains the definition of the stream "significant-stock-change-source|stock-intelligence-processor|event-store-sink".
- _embedded.streamDefinitionResourceList.status