The index provides the entry point into Spring Cloud Data Flow’s REST API.
A GET
request is used to access the index
Path | Type | Description |
---|---|---|
|
| Links to other resources |
|
| Incremented each time a change is implemented in this REST API |
HTTP/1.1 200 OK Content-Type: application/hal+json;charset=UTF-8 Content-Length: 3880 { "_links" : { "dashboard" : { "href" : "http://localhost:8080/dashboard" }, "streams/definitions" : { "href" : "http://localhost:8080/streams/definitions" }, "streams/definitions/definition" : { "href" : "http://localhost:8080/streams/definitions/{name}", "templated" : true }, "streams/deployments" : { "href" : "http://localhost:8080/streams/deployments" }, "streams/deployments/deployment" : { "href" : "http://localhost:8080/streams/deployments/{name}", "templated" : true }, "runtime/apps" : { "href" : "http://localhost:8080/runtime/apps" }, "runtime/apps/app" : { "href" : "http://localhost:8080/runtime/apps/{appId}", "templated" : true }, "runtime/apps/instances" : { "href" : "http://localhost:8080/runtime/apps/interface%20org.springframework.web.util.UriComponents%24UriTemplateVariables/instances" }, "tasks/definitions" : { "href" : "http://localhost:8080/tasks/definitions" }, "tasks/definitions/definition" : { "href" : "http://localhost:8080/tasks/definitions/{name}", "templated" : true }, "tasks/composed-definitions/compose" : { "href" : "http://localhost:8080/tasks/composed-definitions" }, "tasks/executions" : { "href" : "http://localhost:8080/tasks/executions" }, "tasks/executions/name" : { "href" : "http://localhost:8080/tasks/executions{?name}", "templated" : true }, "tasks/executions/execution" : { "href" : "http://localhost:8080/tasks/executions/{id}", "templated" : true }, "jobs/executions" : { "href" : "http://localhost:8080/jobs/executions" }, "jobs/executions/name" : { "href" : "http://localhost:8080/jobs/executions{?name}", "templated" : true }, "jobs/executions/execution" : { "href" : "http://localhost:8080/jobs/executions/{id}", "templated" : true }, "jobs/executions/execution/steps" : { "href" : "http://localhost:8080/jobs/executions/{jobExecutionId}/steps", "templated" : true }, "jobs/executions/execution/steps/step" : { "href" : "http://localhost:8080/jobs/executions/{jobExecutionId}/steps/{stepId}", "templated" : true }, "jobs/executions/execution/steps/step/progress" : { "href" : "http://localhost:8080/jobs/executions/{jobExecutionId}/steps/{stepId}/progress", "templated" : true }, "jobs/instances/name" : { "href" : "http://localhost:8080/jobs/instances{?name}", "templated" : true }, "jobs/instances/instance" : { "href" : "http://localhost:8080/jobs/instances/{id}", "templated" : true }, "counters" : { "href" : "http://localhost:8080/metrics/counters" }, "counters/counter" : { "href" : "http://localhost:8080/metrics/counters/{name}", "templated" : true }, "field-value-counters" : { "href" : "http://localhost:8080/metrics/field-value-counters" }, "field-value-counters/counter" : { "href" : "http://localhost:8080/metrics/field-value-counters/{name}", "templated" : true }, "aggregate-counters" : { "href" : "http://localhost:8080/metrics/aggregate-counters" }, "aggregate-counters/counter" : { "href" : "http://localhost:8080/metrics/aggregate-counters/{name}", "templated" : true }, "apps" : { "href" : "http://localhost:8080/apps" }, "about" : { "href" : "http://localhost:8080/about" }, "completions/stream" : { "href" : "http://localhost:8080/completions/stream{?start,detailLevel}", "templated" : true }, "completions/task" : { "href" : "http://localhost:8080/completions/task{?start,detailLevel}", "templated" : true } }, "api.revision" : 12 }
curl -X POST -d "name=ticktock&definition=time | log" localhost:9393/streams/definitions?deploy=false
curl -X POST http://localhost:9393/streams/deployments/ticktock
HTTP/1.1 200 OK Content-Type: application/hal+json;charset=UTF-8 Content-Length: 3880 { "_links" : { "dashboard" : { "href" : "http://localhost:8080/dashboard" }, "streams/definitions" : { "href" : "http://localhost:8080/streams/definitions" }, "streams/definitions/definition" : { "href" : "http://localhost:8080/streams/definitions/{name}", "templated" : true }, "streams/deployments" : { "href" : "http://localhost:8080/streams/deployments" }, "streams/deployments/deployment" : { "href" : "http://localhost:8080/streams/deployments/{name}", "templated" : true }, "runtime/apps" : { "href" : "http://localhost:8080/runtime/apps" }, "runtime/apps/app" : { "href" : "http://localhost:8080/runtime/apps/{appId}", "templated" : true }, "runtime/apps/instances" : { "href" : "http://localhost:8080/runtime/apps/interface%20org.springframework.web.util.UriComponents%24UriTemplateVariables/instances" }, "tasks/definitions" : { "href" : "http://localhost:8080/tasks/definitions" }, "tasks/definitions/definition" : { "href" : "http://localhost:8080/tasks/definitions/{name}", "templated" : true }, "tasks/composed-definitions/compose" : { "href" : "http://localhost:8080/tasks/composed-definitions" }, "tasks/executions" : { "href" : "http://localhost:8080/tasks/executions" }, "tasks/executions/name" : { "href" : "http://localhost:8080/tasks/executions{?name}", "templated" : true }, "tasks/executions/execution" : { "href" : "http://localhost:8080/tasks/executions/{id}", "templated" : true }, "jobs/executions" : { "href" : "http://localhost:8080/jobs/executions" }, "jobs/executions/name" : { "href" : "http://localhost:8080/jobs/executions{?name}", "templated" : true }, "jobs/executions/execution" : { "href" : "http://localhost:8080/jobs/executions/{id}", "templated" : true }, "jobs/executions/execution/steps" : { "href" : "http://localhost:8080/jobs/executions/{jobExecutionId}/steps", "templated" : true }, "jobs/executions/execution/steps/step" : { "href" : "http://localhost:8080/jobs/executions/{jobExecutionId}/steps/{stepId}", "templated" : true }, "jobs/executions/execution/steps/step/progress" : { "href" : "http://localhost:8080/jobs/executions/{jobExecutionId}/steps/{stepId}/progress", "templated" : true }, "jobs/instances/name" : { "href" : "http://localhost:8080/jobs/instances{?name}", "templated" : true }, "jobs/instances/instance" : { "href" : "http://localhost:8080/jobs/instances/{id}", "templated" : true }, "counters" : { "href" : "http://localhost:8080/metrics/counters" }, "counters/counter" : { "href" : "http://localhost:8080/metrics/counters/{name}", "templated" : true }, "field-value-counters" : { "href" : "http://localhost:8080/metrics/field-value-counters" }, "field-value-counters/counter" : { "href" : "http://localhost:8080/metrics/field-value-counters/{name}", "templated" : true }, "aggregate-counters" : { "href" : "http://localhost:8080/metrics/aggregate-counters" }, "aggregate-counters/counter" : { "href" : "http://localhost:8080/metrics/aggregate-counters/{name}", "templated" : true }, "apps" : { "href" : "http://localhost:8080/apps" }, "about" : { "href" : "http://localhost:8080/about" }, "completions/stream" : { "href" : "http://localhost:8080/completions/stream{?start,detailLevel}", "templated" : true }, "completions/task" : { "href" : "http://localhost:8080/completions/task{?start,detailLevel}", "templated" : true } }, "api.revision" : 12 }
The main element of the index are the links as they allow you to traverse the API and execute the desired functionality:
Relation | Description |
---|---|
| Access meta information, including enabled features, security info, version information |
| Access the dashboard UI |
| Handle registered applications |
| Exposes the DSL completion features for Stream |
| Exposes the DSL completion features for Task |
| Provides the JobExecution resource |
| Provides details for a specific JobExecution |
| Provides the steps for a JobExecution |
| Returns the details for a specific step |
| Provides progress information for a specific step |
| Retrieve Job Executions by Job name |
| Provides the job instance resource for a specific job instance |
| Provides the Job instance resource for a specific job name |
| Provides the runtime application resource |
| Exposes the runtime status for a specific app |
| Provides the status for app instances |
| Provides the task definition resource |
| Provides details for a specific task definition |
| Requests the creation of a composed task definition |
| Returns Task executions and allows lanching of tasks |
| Returns all task executions for a given Task name |
| Provides details for a specific task execution |
| Exposes the Streams resource |
| Handle a specific Stream definition |
| Provides Stream deployment operations |
| Request (un-)deployment of an existing stream definition |
| Exposes the resource for dealing with Counters |
| Handle a specific counter |
| Provides the resource for dealing with aggregate counters |
| Handle a specific aggregate counter |
| Provides the resource for dealing with field-value-counters |
| Handle a specific field-value-counter |
A GET
request will return meta information for Spring Cloud Data Flow. This includes:
Unresolved directive in api-guide.adoc - include::/opt/bamboo-home/xml-data/build-dir/SCD-BMASTER-JOB1/spring-cloud-dataflow-docs/target/generated-snippets/about-documentation/get-meta-information/request-parameters.adoc[]
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: 1884 { "featureInfo" : { "analyticsEnabled" : true, "streamsEnabled" : true, "tasksEnabled" : true }, "versionInfo" : { "implementation" : { "name" : "spring-cloud-starter-dataflow-server-local", "version" : "1.2.0.M3" }, "core" : { "name" : "Spring Cloud Data Flow Core", "version" : "1.2.0.M3" }, "dashboard" : { "name" : "Spring Cloud Dataflow UI", "version" : "1.2.0.M2" }, "commitId" : null, "shortCommitId" : null, "commitTime" : null, "branch" : null }, "securityInfo" : { "authenticationEnabled" : false, "authorizationEnabled" : true, "formLogin" : false, "authenticated" : false, "username" : null, "roles" : [ ] }, "runtimeEnvironment" : { "appDeployer" : { "deployerImplementationVersion" : "1.2.0.M3", "deployerName" : "LocalAppDeployer", "deployerSpiVersion" : "1.2.0.M3", "javaVersion" : "1.8.0_121", "platformApiVersion" : "Linux 4.4.0-66-generic", "platformClientVersion" : "4.4.0-66-generic", "platformHostVersion" : "4.4.0-66-generic", "platformSpecificInfo" : { }, "platformType" : "Local", "springBootVersion" : "1.5.2.RELEASE", "springVersion" : "4.3.6.RELEASE" }, "taskLauncher" : { "deployerImplementationVersion" : "1.2.0.M3", "deployerName" : "LocalTaskLauncher", "deployerSpiVersion" : "1.2.0.M3", "javaVersion" : "1.8.0_121", "platformApiVersion" : "Linux 4.4.0-66-generic", "platformClientVersion" : "4.4.0-66-generic", "platformHostVersion" : "4.4.0-66-generic", "platformSpecificInfo" : { }, "platformType" : "Local", "springBootVersion" : "1.5.2.RELEASE", "springVersion" : "4.3.6.RELEASE" } }, "_links" : { "self" : { "href" : "http://localhost:8080/about" } } }
A GET
request will list all applications known to Spring Cloud Data Flow.
GET /apps?type=source HTTP/1.1 Accept: application/json Host: localhost:8080
$ curl 'http://localhost:8080/apps?type=source' -i -H 'Accept: application/json'